summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/GameLogic.cpp14
-rw-r--r--src/control/Replay.cpp6
-rw-r--r--src/control/Script.cpp12
3 files changed, 16 insertions, 16 deletions
diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp
index ed101cad..ccba05c9 100644
--- a/src/control/GameLogic.cpp
+++ b/src/control/GameLogic.cpp
@@ -30,7 +30,7 @@ CGameLogic::InitAtStartOfGame()
void
CGameLogic::PassTime(uint32 time)
{
- uint8 minutes, hours, days;
+ int32 minutes, hours, days;
minutes = time + CClock::GetMinutes();
hours = CClock::GetHours();
@@ -112,8 +112,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
- CRestart::OverrideHospitalLevel = false;
- CRestart::OverridePoliceStationLevel = false;
+ CRestart::OverrideHospitalLevel = LEVEL_NONE;
+ CRestart::OverridePoliceStationLevel = LEVEL_NONE;
PassTime(720);
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
@@ -183,8 +183,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
- CRestart::OverrideHospitalLevel = false;
- CRestart::OverridePoliceStationLevel = false;
+ CRestart::OverrideHospitalLevel = LEVEL_NONE;
+ CRestart::OverridePoliceStationLevel = LEVEL_NONE;
PassTime(720);
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
pPlayerInfo.m_pPed->ClearWeapons();
@@ -224,8 +224,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
- CRestart::OverridePoliceStationLevel = false;
- CRestart::OverrideHospitalLevel = false;
+ CRestart::OverridePoliceStationLevel = LEVEL_NONE;
+ CRestart::OverrideHospitalLevel = LEVEL_NONE;
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
TheCamera.m_fCamShakeForce = 0.0f;
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 473b13d3..1bd1bf4b 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -1036,7 +1036,7 @@ void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float ca
bAllowLookAroundCam = true;
bPlayingBackFromFile = false;
OldRadioStation = DMAudio.GetRadioInCar();
- DMAudio.ChangeMusicMode(0);
+ DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.SetEffectsFadeVol(0);
DMAudio.SetMusicFadeVol(0);
int current;
@@ -1282,9 +1282,9 @@ void CReplay::RestoreStuffFromMem(void)
}
delete[] pPedAnims;
pPedAnims = nil;
- DMAudio.ChangeMusicMode(0);
+ DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.SetRadioInCar(OldRadioStation);
- DMAudio.ChangeMusicMode(1);
+ DMAudio.ChangeMusicMode(MUSICMODE_GAME);
}
#endif
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: