summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-12-02 21:02:32 +0100
committereray orçunus <erayorcunus@gmail.com>2019-12-05 22:55:23 +0100
commitdad7782ff0be00775f99ad54c656e58b39190b47 (patch)
treee3c8c7402ac4e7403e904d4de9cf43c22b4b0e83 /src/control/Script.cpp
parentMerge pull request #278 from Fire-Head/master (diff)
downloadre3-dad7782ff0be00775f99ad54c656e58b39190b47.tar
re3-dad7782ff0be00775f99ad54c656e58b39190b47.tar.gz
re3-dad7782ff0be00775f99ad54c656e58b39190b47.tar.bz2
re3-dad7782ff0be00775f99ad54c656e58b39190b47.tar.lz
re3-dad7782ff0be00775f99ad54c656e58b39190b47.tar.xz
re3-dad7782ff0be00775f99ad54c656e58b39190b47.tar.zst
re3-dad7782ff0be00775f99ad54c656e58b39190b47.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 2e3d287a..15cf798b 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1734,7 +1734,7 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command)
CollectParameters(&m_nIp, 1);
CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]);
if (ped) {
- if (ped->bInVehicle && ped->m_pMyVehicle) {
+ if (ped->InVehicle()) {
if (ped->m_pMyVehicle->pDriver == ped) {
ped->m_pMyVehicle->RemoveDriver();
ped->m_pMyVehicle->m_status = STATUS_ABANDONED;
@@ -4947,7 +4947,7 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
assert(pPed);
CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]);
bool isTouching = false;
- if (pPed->bInVehicle && pPed->m_pMyVehicle)
+ if (pPed->InVehicle())
isTouching = false;
else if (pPed->GetHasCollidedWith(pObject))
isTouching = true;
@@ -5090,7 +5090,7 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
case COMMAND_HAS_PHONE_DISPLAYED_MESSAGE:
{
CollectParameters(&m_nIp, 1);
- gPhoneInfo.HasMessageBeenDisplayed(ScriptParams[0]);
+ UpdateCompareFlag(gPhoneInfo.HasMessageBeenDisplayed(ScriptParams[0]));
return 0;
}
case COMMAND_TURN_PHONE_OFF: