summaryrefslogtreecommitdiffstats
path: root/src/core/EventList.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-25 15:15:01 +0200
committerGitHub <noreply@github.com>2020-06-25 15:15:01 +0200
commit592a6aef0bb336f1364e6bf38230f3793ec35c4d (patch)
tree3b8df6abb470acc7b9b55d0e8476e1478ba626c0 /src/core/EventList.cpp
parentrename attractor flag to type (diff)
parentCWanted, anim fix, ped objs renaming, remove III beta features (diff)
downloadre3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.gz
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.bz2
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.lz
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.xz
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.zst
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.zip
Diffstat (limited to 'src/core/EventList.cpp')
-rw-r--r--src/core/EventList.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp
index c3508a51..4fab29bc 100644
--- a/src/core/EventList.cpp
+++ b/src/core/EventList.cpp
@@ -187,6 +187,7 @@ CEventList::FindClosestEvent(eEventType type, CVector posn, int32 *event)
return found;
}
+// --MIAMI: Done
void
CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCare)
{
@@ -201,19 +202,31 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar
case EVENT_HIT_AND_RUN_COP: crime = CRIME_RUNOVER_COP; break;
case EVENT_SHOOT_PED: crime = CRIME_SHOOT_PED; break;
case EVENT_SHOOT_COP: crime = CRIME_SHOOT_COP; break;
+ case EVENT_EXPLOSION: crime = CRIME_EXPLOSION; break;
case EVENT_PED_SET_ON_FIRE: crime = CRIME_PED_BURNED; break;
case EVENT_COP_SET_ON_FIRE: crime = CRIME_COP_BURNED; break;
case EVENT_CAR_SET_ON_FIRE: crime = CRIME_VEHICLE_BURNED; break;
+ case EVENT_ASSAULT_NASTYWEAPON: crime = CRIME_HIT_PED_NASTYWEAPON; break;
+ case EVENT_ASSAULT_NASTYWEAPON_POLICE: crime = CRIME_HIT_COP_NASTYWEAPON; break;
default: crime = CRIME_NONE; break;
}
+ if (crime == CRIME_HIT_PED && IsPedPointerValid((CPed*)crimeId) && FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) {
+ if (!((CPed*)crimeId)->DyingOrDead()) {
+ CMessages::AddBigMessage(TheText.Get("GOODBOY"), 5000, 0);
+ CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 50;
+ }
+ return;
+ }
+
if(crime == CRIME_NONE)
return;
CVector playerPedCoors = FindPlayerPed()->GetPosition();
CVector playerCoors = FindPlayerCoors();
- if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0){
+ if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0 ||
+ CGame::germanGame && (crime == CRIME_SHOOT_PED || crime == CRIME_SHOOT_COP || crime == CRIME_COP_BURNED || crime == CRIME_VEHICLE_BURNED)){
FindPlayerPed()->m_pWanted->RegisterCrime_Immediately(crime, playerPedCoors, crimeId, copsDontCare);
FindPlayerPed()->m_pWanted->SetWantedLevelNoDrop(1);
}else
@@ -221,7 +234,7 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar
if(type == EVENT_ASSAULT_POLICE)
FindPlayerPed()->SetWantedLevelNoDrop(1);
- if(type == EVENT_SHOOT_COP)
+ if(type == EVENT_SHOOT_COP || type == EVENT_ASSAULT_NASTYWEAPON_POLICE)
FindPlayerPed()->SetWantedLevelNoDrop(2);
}