summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2019-10-21 00:08:26 +0200
committerSergeanur <s.anureev@yandex.ua>2019-10-21 00:11:47 +0200
commite35780df43d5bd17f1e2a6ae731a63d034d1c5c4 (patch)
tree3c5fdc960e7e7db354ae15ef55f74f810c7a3a61 /src/control/Script.cpp
parentFull CPager (diff)
downloadre3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.tar
re3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.tar.gz
re3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.tar.bz2
re3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.tar.lz
re3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.tar.xz
re3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.tar.zst
re3-e35780df43d5bd17f1e2a6ae731a63d034d1c5c4.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 777acb12..ced06f1e 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -662,12 +662,12 @@ void CRunningScript::Process()
if (!CPad::GetPad(0)->GetCrossJustDown())
return;
m_nWakeTime = 0;
- for (int i = 0; i < 6; i++){ /* TODO: add constant for number of messages */
- if (CMessages::BIGMessages[i].m_Current.m_pText)
- CMessages::BIGMessages[i].m_Current.m_nStartTime = 0;
- if (CMessages::BriefMessages[0].m_pText)
- CMessages::BriefMessages[0].m_nStartTime = 0;
+ for (int i = 0; i < NUMBIGMESSAGES; i++){
+ if (CMessages::BIGMessages[i].m_Stack[0].m_pText != nil)
+ CMessages::BIGMessages[i].m_Stack[0].m_nStartTime = 0;
}
+ if (CMessages::BriefMessages[0].m_pText != nil)
+ CMessages::BriefMessages[0].m_nStartTime = 0;
}
int8 CRunningScript::ProcessOneCommand()
@@ -2183,7 +2183,7 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command)
wchar* key = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]);
m_nIp += 8;
CollectParameters(&m_nIp, 2);
- CMessages::AddMessage(key, ScriptParams[0], ScriptParams[1]);
+ CMessages::AddMessageSoon(key, ScriptParams[0], ScriptParams[1]);
return 0;
}
case COMMAND_CLEAR_PRINTS: