diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-11 18:53:15 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-11 18:53:15 +0100 |
commit | a223157000fac3ba63699f04bc9e466f53a412e3 (patch) | |
tree | 54e1e672a564ffdb5d65e0748a86fae60f3eb895 /src/core/Streaming.cpp | |
parent | of course (diff) | |
download | re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.gz re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.bz2 re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.lz re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.xz re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.zst re3-a223157000fac3ba63699f04bc9e466f53a412e3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/Streaming.cpp | 93 |
1 files changed, 44 insertions, 49 deletions
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 4fff2367..4198dd84 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -37,6 +37,7 @@ #include "Font.h" #include "Frontend.h" #include "VarConsole.h" +#include "KeyGen.h" //--MIAMI: file done (possibly bugs) @@ -948,53 +949,45 @@ CStreaming::RequestIslands(eLevelName level) } } -static char *IGnames[] = { - "player", - "player2", - "player3", - "player4", - "player5", - "player6", - "player7", - "player8", - "player9", - "play10", - "play11", - "igken", - "igcandy", - "igsonny", - "igbuddy", - "igjezz", - "ighlary", - "igphil", - "igmerc", - "igdick", - "igdiaz", +const char *csPlayerNames[] = +{ + "csplr", + "csplr2", + "csplr3", + "csplr4", + "csplr5", + "csplr6", + "csplr7", + "csplr8", + "csplr9", + "csplr10", + "csplr11", + "csplr12", + "csplr13", + "csplr14", + "csplr15", + "csplr16", "" }; -static char *CSnames[] = { - "csplay", - "csplay2", - "csplay3", - "csplay4", - "csplay5", - "csplay6", - "csplay7", - "csplay8", - "csplay9", - "csplay10", - "csplay11", - "csken", - "cscandy", - "cssonny", - "csbuddy", - "csjezz", - "cshlary", - "csphil", - "csmerc", - "csdick", - "csdiaz", +const char* playerNames[] = +{ + "plr", + "plr2", + "plr3", + "plr4", + "plr5", + "plr6", + "plr7", + "plr8", + "plr9", + "plr10", + "plr11", + "plr12", + "plr13", + "plr14", + "plr15", + "plr16", "" }; @@ -1008,15 +1001,17 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag int i, n; mi = CModelInfo::GetModelInfo(modelId); - if(strncasecmp("CSPlay", modelName, 6) == 0){ - char *curname = CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName(); - for(int i = 0; CSnames[i][0]; i++){ - if(strcasecmp(curname, IGnames[i]) == 0){ - modelName = CSnames[i]; + if (CKeyGen::GetUppercaseKey(modelName) == CKeyGen::GetUppercaseKey("cstoni_a")) { + i = 0; + while (csPlayerNames[i][0] != '\0') { + if (CModelInfo::GetModelInfo(0)->GetNameHashKey() == CKeyGen::GetUppercaseKey(playerNames[i])) { + modelName = csPlayerNames[i]; break; } + i++; } } + if(!CGeneral::faststrcmp(mi->GetModelName(), modelName)){ // Already have the correct name, just request it RequestModel(modelId, flags); |