summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-20 15:30:11 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-20 15:30:11 +0200
commitef831a491e2edbce9e1237d3c5d68695ad7da766 (patch)
treeff6255442bf8f0235a7c5d5d5aad6c3249d5069a /src/control/Script.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-ef831a491e2edbce9e1237d3c5d68695ad7da766.tar
re3-ef831a491e2edbce9e1237d3c5d68695ad7da766.tar.gz
re3-ef831a491e2edbce9e1237d3c5d68695ad7da766.tar.bz2
re3-ef831a491e2edbce9e1237d3c5d68695ad7da766.tar.lz
re3-ef831a491e2edbce9e1237d3c5d68695ad7da766.tar.xz
re3-ef831a491e2edbce9e1237d3c5d68695ad7da766.tar.zst
re3-ef831a491e2edbce9e1237d3c5d68695ad7da766.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index d9c32e7a..bd43d301 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -79,6 +79,7 @@ CMissionCleanup::CMissionCleanup()
void CMissionCleanup::Init()
{
+ m_nCount = 0;
for (int i = 0; i < MAX_CLEANUP; i++){
m_sEntities[i].type = CLEANUP_UNUSED;
m_sEntities[i].id = 0;
@@ -102,7 +103,7 @@ void CMissionCleanup::AddEntityToList(int32 id, uint8 type)
return;
pNew->id = id;
pNew->type = type;
- m_bCount++;
+ m_nCount++;
}
void CMissionCleanup::RemoveEntityFromList(int32 id, uint8 type)
@@ -111,6 +112,7 @@ void CMissionCleanup::RemoveEntityFromList(int32 id, uint8 type)
if (m_sEntities[i].type == type && m_sEntities[i].id == id){
m_sEntities[i].id = 0;
m_sEntities[i].type = CLEANUP_UNUSED;
+ m_nCount--;
}
}
}
@@ -603,7 +605,7 @@ void CTheScripts::Process()
if (UseTextCommands){
for (int i = 0; i < MAX_NUM_INTRO_TEXT_LINES; i++)
IntroTextLines[i].Reset();
- NumberOfIntroRectanglesThisFrame = 0;
+ NumberOfIntroTextLinesThisFrame = 0;
for (int i = 0; i < MAX_NUM_INTRO_RECTANGLES; i++){
IntroRectangles[i].m_bIsUsed = false;
IntroRectangles[i].m_bBeforeFade = false;
@@ -1638,27 +1640,27 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command)
CollectParameters(&m_nIp, 5);
switch (ScriptParams[1]) {
case MI_COP:
- if (ScriptParams[0] = PEDTYPE_COP)
+ if (ScriptParams[0] == PEDTYPE_COP)
ScriptParams[1] = COP_STREET;
break;
case MI_SWAT:
- if (ScriptParams[0] = PEDTYPE_COP)
+ if (ScriptParams[0] == PEDTYPE_COP)
ScriptParams[1] = COP_SWAT;
break;
case MI_FBI:
- if (ScriptParams[0] = PEDTYPE_COP)
+ if (ScriptParams[0] == PEDTYPE_COP)
ScriptParams[1] = COP_FBI;
break;
case MI_ARMY:
- if (ScriptParams[0] = PEDTYPE_COP)
+ if (ScriptParams[0] == PEDTYPE_COP)
ScriptParams[1] = COP_ARMY;
break;
case MI_MEDIC:
- if (ScriptParams[0] = PEDTYPE_EMERGENCY)
+ if (ScriptParams[0] == PEDTYPE_EMERGENCY)
ScriptParams[1] = PEDTYPE_EMERGENCY;
break;
case MI_FIREMAN:
- if (ScriptParams[0] = PEDTYPE_FIREMAN)
+ if (ScriptParams[0] == PEDTYPE_FIREMAN)
ScriptParams[1] = PEDTYPE_FIREMAN;
break;
default: