mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed an issue with file IDs of additional game msg files being shifted when a file in ExtraGameMsgFileList is missing.
This commit is contained in:
+3
-1
@@ -118,6 +118,7 @@ void ReadExtraGameMsgFiles() {
|
|||||||
int begin = 0;
|
int begin = 0;
|
||||||
int end;
|
int end;
|
||||||
int length;
|
int length;
|
||||||
|
int number = 0;
|
||||||
|
|
||||||
while ((end = names.find_first_of(',', begin)) != std::string::npos) {
|
while ((end = names.find_first_of(',', begin)) != std::string::npos) {
|
||||||
length = end - begin;
|
length = end - begin;
|
||||||
@@ -127,10 +128,11 @@ void ReadExtraGameMsgFiles() {
|
|||||||
MSGList* list = new MSGList;
|
MSGList* list = new MSGList;
|
||||||
|
|
||||||
if (LoadMsgList(list, (char*)path.data()) == 1)
|
if (LoadMsgList(list, (char*)path.data()) == 1)
|
||||||
gExtraGameMsgLists.insert(std::make_pair(0x2000 + gExtraGameMsgLists.size(), list));
|
gExtraGameMsgLists.insert(std::make_pair(0x2000 + number, list));
|
||||||
else
|
else
|
||||||
delete list;
|
delete list;
|
||||||
}
|
}
|
||||||
|
number++;
|
||||||
|
|
||||||
begin = end + 1;
|
begin = end + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user