mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 12:00:01 +00:00
fixed script issues
This commit is contained in:
parent
be8e29e4e2
commit
ef831a491e
|
@ -79,6 +79,7 @@ CMissionCleanup::CMissionCleanup()
|
||||||
|
|
||||||
void CMissionCleanup::Init()
|
void CMissionCleanup::Init()
|
||||||
{
|
{
|
||||||
|
m_nCount = 0;
|
||||||
for (int i = 0; i < MAX_CLEANUP; i++){
|
for (int i = 0; i < MAX_CLEANUP; i++){
|
||||||
m_sEntities[i].type = CLEANUP_UNUSED;
|
m_sEntities[i].type = CLEANUP_UNUSED;
|
||||||
m_sEntities[i].id = 0;
|
m_sEntities[i].id = 0;
|
||||||
|
@ -102,7 +103,7 @@ void CMissionCleanup::AddEntityToList(int32 id, uint8 type)
|
||||||
return;
|
return;
|
||||||
pNew->id = id;
|
pNew->id = id;
|
||||||
pNew->type = type;
|
pNew->type = type;
|
||||||
m_bCount++;
|
m_nCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMissionCleanup::RemoveEntityFromList(int32 id, uint8 type)
|
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){
|
if (m_sEntities[i].type == type && m_sEntities[i].id == id){
|
||||||
m_sEntities[i].id = 0;
|
m_sEntities[i].id = 0;
|
||||||
m_sEntities[i].type = CLEANUP_UNUSED;
|
m_sEntities[i].type = CLEANUP_UNUSED;
|
||||||
|
m_nCount--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -603,7 +605,7 @@ void CTheScripts::Process()
|
||||||
if (UseTextCommands){
|
if (UseTextCommands){
|
||||||
for (int i = 0; i < MAX_NUM_INTRO_TEXT_LINES; i++)
|
for (int i = 0; i < MAX_NUM_INTRO_TEXT_LINES; i++)
|
||||||
IntroTextLines[i].Reset();
|
IntroTextLines[i].Reset();
|
||||||
NumberOfIntroRectanglesThisFrame = 0;
|
NumberOfIntroTextLinesThisFrame = 0;
|
||||||
for (int i = 0; i < MAX_NUM_INTRO_RECTANGLES; i++){
|
for (int i = 0; i < MAX_NUM_INTRO_RECTANGLES; i++){
|
||||||
IntroRectangles[i].m_bIsUsed = false;
|
IntroRectangles[i].m_bIsUsed = false;
|
||||||
IntroRectangles[i].m_bBeforeFade = false;
|
IntroRectangles[i].m_bBeforeFade = false;
|
||||||
|
@ -1638,27 +1640,27 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command)
|
||||||
CollectParameters(&m_nIp, 5);
|
CollectParameters(&m_nIp, 5);
|
||||||
switch (ScriptParams[1]) {
|
switch (ScriptParams[1]) {
|
||||||
case MI_COP:
|
case MI_COP:
|
||||||
if (ScriptParams[0] = PEDTYPE_COP)
|
if (ScriptParams[0] == PEDTYPE_COP)
|
||||||
ScriptParams[1] = COP_STREET;
|
ScriptParams[1] = COP_STREET;
|
||||||
break;
|
break;
|
||||||
case MI_SWAT:
|
case MI_SWAT:
|
||||||
if (ScriptParams[0] = PEDTYPE_COP)
|
if (ScriptParams[0] == PEDTYPE_COP)
|
||||||
ScriptParams[1] = COP_SWAT;
|
ScriptParams[1] = COP_SWAT;
|
||||||
break;
|
break;
|
||||||
case MI_FBI:
|
case MI_FBI:
|
||||||
if (ScriptParams[0] = PEDTYPE_COP)
|
if (ScriptParams[0] == PEDTYPE_COP)
|
||||||
ScriptParams[1] = COP_FBI;
|
ScriptParams[1] = COP_FBI;
|
||||||
break;
|
break;
|
||||||
case MI_ARMY:
|
case MI_ARMY:
|
||||||
if (ScriptParams[0] = PEDTYPE_COP)
|
if (ScriptParams[0] == PEDTYPE_COP)
|
||||||
ScriptParams[1] = COP_ARMY;
|
ScriptParams[1] = COP_ARMY;
|
||||||
break;
|
break;
|
||||||
case MI_MEDIC:
|
case MI_MEDIC:
|
||||||
if (ScriptParams[0] = PEDTYPE_EMERGENCY)
|
if (ScriptParams[0] == PEDTYPE_EMERGENCY)
|
||||||
ScriptParams[1] = PEDTYPE_EMERGENCY;
|
ScriptParams[1] = PEDTYPE_EMERGENCY;
|
||||||
break;
|
break;
|
||||||
case MI_FIREMAN:
|
case MI_FIREMAN:
|
||||||
if (ScriptParams[0] = PEDTYPE_FIREMAN)
|
if (ScriptParams[0] == PEDTYPE_FIREMAN)
|
||||||
ScriptParams[1] = PEDTYPE_FIREMAN;
|
ScriptParams[1] = PEDTYPE_FIREMAN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -137,7 +137,7 @@ enum {
|
||||||
class CMissionCleanup
|
class CMissionCleanup
|
||||||
{
|
{
|
||||||
CMissionCleanupEntity m_sEntities[MAX_CLEANUP];
|
CMissionCleanupEntity m_sEntities[MAX_CLEANUP];
|
||||||
uint8 m_bCount;
|
uint8 m_nCount;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMissionCleanup();
|
CMissionCleanup();
|
||||||
|
|
Loading…
Reference in a new issue