diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-06 13:26:50 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-06 13:26:50 +0200 |
commit | e10f5ee6a3f94a5ff2559f868c884e47d4628271 (patch) | |
tree | 3b2a2ceafc26e4215b49bf56e75cf80568251f26 /src/peds/CivilianPed.cpp | |
parent | car AI (diff) | |
parent | Fixed player blip heading when looking left/right/behind (diff) | |
download | re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.gz re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.bz2 re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.lz re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.xz re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.zst re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.zip |
Diffstat (limited to 'src/peds/CivilianPed.cpp')
-rw-r--r-- | src/peds/CivilianPed.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp index f28a1134..93cdcb3d 100644 --- a/src/peds/CivilianPed.cpp +++ b/src/peds/CivilianPed.cpp @@ -8,34 +8,11 @@ WRAPPER void CCivilianPed::ProcessControl(void) { EAXJMP(0x4BFFE0); } CCivilianPed::CCivilianPed(int pedtype, int mi) : CPed(pedtype) { SetModelIndex(mi); - for (int i = 0; i < 10; i++) - { + for (int i = 0; i < 10; i++) { m_nearPeds[i] = nil; } } -bool -CCivilianPed::ProcessNearestFreePhone(int unused) -{ - if (m_nPedState == PED_SEEK_POS) - return false; - - int phoneId = gPhoneInfo.FindNearestFreePhone(&GetPosition()); - - if (phoneId == -1) - return false; - - if (gPhoneInfo.m_aPhones[phoneId].m_nState != PHONE_STATE_FREE) - return false; - - bRunningToPhone = true; - SetMoveState(PEDMOVE_RUN); - SetSeek(gPhoneInfo.m_aPhones[phoneId].m_vecPos, 0.3f); - m_phoneId = phoneId; - m_lookingForPhone = unused; - return true; -} - class CCivilianPed_ : public CCivilianPed { public: @@ -46,5 +23,4 @@ public: STARTPATCHES InjectHook(0x4BFF30, &CCivilianPed_::ctor, PATCH_JUMP); InjectHook(0x4BFFC0, &CCivilianPed_::dtor, PATCH_JUMP); - InjectHook(0x4C10C0, &CCivilianPed::ProcessNearestFreePhone, PATCH_JUMP); ENDPATCHES |