diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-16 17:41:17 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-16 17:41:17 +0200 |
commit | cc66df18acfa458d4e3b82c4bb677a4b218c599d (patch) | |
tree | 2b210f1318adf58db51e432eefcd188280b4c8ef /src/control/Script.cpp | |
parent | CarCtrl finished, minor Script things (diff) | |
parent | 2 new opcodes (diff) | |
download | re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.tar re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.tar.gz re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.tar.bz2 re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.tar.lz re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.tar.xz re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.tar.zst re3-cc66df18acfa458d4e3b82c4bb677a4b218c599d.zip |
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r-- | src/control/Script.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 6fbe6c81..e470cad2 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1824,7 +1824,7 @@ void CMissionCleanup::Process() CWorld::Players[0].MakePlayerSafe(false); CWorld::Players[0].m_pPed->m_nFadeDrunkenness = 1; CWorld::Players[0].m_pPed->m_nDrunkCountdown = 0; - // CPad::GetPad(0)->SetDrunkInputDelay(0); // TODO(Miami) + CPad::GetPad(0)->SetDrunkInputDelay(0); CWorld::Players[0].m_bDriveByAllowed = true; // DMAudio::ShutUpPlayerTalking(0); // TODO(Miami) CVehicle::bDisableRemoteDetonation = false; @@ -10645,7 +10645,8 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) case COMMAND_SET_DRUNK_INPUT_DELAY: { CollectParameters(&m_nIp, 2); - debug("SET_DRUNK_INPUT_DELAY not implemented\n"); + assert(ScriptParams[1] < CPad::DRUNK_STEERING_BUFFER_SIZE); + CPad::GetPad(ScriptParams[0])->SetDrunkInputDelay(ScriptParams[1]); return 0; } case COMMAND_SET_CHAR_MONEY: @@ -13609,9 +13610,11 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_GET_BUS_FARES_COLLECTED_BY_PLAYER: { CollectParameters(&m_nIp, 1); - debug("GET_BUS_FARES_COLLECTED_BY_PLAYER not implemented\n"); // TODO(MIAMI) - ScriptParams[0] = 0; + CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; + ScriptParams[0] = pPlayerInfo->m_pPed->m_nLastBusFareCollected; + pPlayerInfo->m_pPed->m_nLastBusFareCollected = 0; StoreParameters(&m_nIp, 1); + return 0; } case COMMAND_SET_CHAR_OBJ_BUY_ICE_CREAM: { |