mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- Check for FileExists() before calling the ReadInSpreadPatterns() method
o The "SpreadPatterns.xml" file is optional. If the file does not exist (e.g: "Data"), hardcoded values are taken from the game git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6656 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -205,8 +205,11 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
//This needs to be loaded before AmmoTypes and Items because SpreadPatterns can be referenced by name or index.
|
//This needs to be loaded before AmmoTypes and Items because SpreadPatterns can be referenced by name or index.
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, SPREADPATTERNSFILENAME);
|
strcat(fileName, SPREADPATTERNSFILENAME);
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
if (FileExists(fileName))
|
||||||
ReadInSpreadPatterns(fileName);
|
{
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
ReadInSpreadPatterns(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
// WANNE: Enemy drops - begin
|
// WANNE: Enemy drops - begin
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
|
|||||||
Reference in New Issue
Block a user