Reorganize CPed functions into their original cpp files

This commit is contained in:
Sergeanur
2020-11-20 01:18:37 +02:00
parent 54214dd2c4
commit fe40f65703
16 changed files with 17686 additions and 17665 deletions

View File

@@ -420,6 +420,32 @@ CCivilianPed::ProcessControl(void)
Avoid();
}
// --MIAMI: Done
bool
CPed::RunToReportCrime(eCrimeType crimeToReport)
{
// They changed true into false to make this function unusable. So running to phone actually starts but first frame after that cancels it.
if (m_nPedState == PED_SEEK_POS)
return false;
CVector pos = GetPosition();
int phoneId = gPhoneInfo.FindNearestFreePhone(&pos);
if (phoneId == -1)
return false;
CPhone* phone = &gPhoneInfo.m_aPhones[phoneId];
if (phone->m_nState != PHONE_STATE_FREE)
return false;
bRunningToPhone = true;
SetSeek(phone->m_vecPos, 0.3f);
SetMoveState(PEDMOVE_RUN);
m_phoneId = phoneId;
m_crimeToReportOnPhone = crimeToReport;
return true;
}
const int32 gFrequencyOfAttractorAttempt = 11;
const float gDistanceToSeekAttractors = 50.0f;
const float gMaxDistanceToAttract = 10.0f;