diff --git a/src_rebuild/DebugOverlay.cpp b/src_rebuild/DebugOverlay.cpp index a0e30e63..259b15fa 100644 --- a/src_rebuild/DebugOverlay.cpp +++ b/src_rebuild/DebugOverlay.cpp @@ -8,15 +8,14 @@ #include "Game/C/pres.h" #include "Game/C/spool.h" #include "Game/C/cars.h" -#include "Game/C/cop_ai.h" #include "Game/C/draw.h" #include "Game/C/players.h" #include "Game/C/glaunch.h" -#include "Game/C/dr2roads.h" - #include +#include "C/felony.h" + int gDisplayDrawStats = 0; diff --git a/src_rebuild/Game/C/cop_ai.c b/src_rebuild/Game/C/cop_ai.c index 3fa14e1f..dd5d53c9 100644 --- a/src_rebuild/Game/C/cop_ai.c +++ b/src_rebuild/Game/C/cop_ai.c @@ -40,9 +40,6 @@ COP_DATA gCopData = { int speed1[] = { 203, 210, 217 }; int speed2[] = { 238, 266, 294 }; -int CopsCanSeePlayer = 0; -short pedestrianFelony = 0; - int numRoadblockCars = 0; int roadblockCount = 0; int copsAreInPursuit = 0; @@ -308,7 +305,6 @@ void InitCops(void) OutOfSightCount = 0; cop_respawn_timer = 0; - CopsCanSeePlayer = 0; CarTail.vx = 0; CarTail.vy = 0; diff --git a/src_rebuild/Game/C/cop_ai.h b/src_rebuild/Game/C/cop_ai.h index b806a156..92023b22 100644 --- a/src_rebuild/Game/C/cop_ai.h +++ b/src_rebuild/Game/C/cop_ai.h @@ -5,9 +5,6 @@ extern COP_DATA gCopData; extern COP_SIGHT_DATA copSightData; extern VECTOR roadblockLoc; -extern int CopsCanSeePlayer; -extern short pedestrianFelony; - extern int numRoadblockCars; extern int roadblockCount; extern int copsAreInPursuit; diff --git a/src_rebuild/Game/C/felony.c b/src_rebuild/Game/C/felony.c index 5869295e..d61cbbe1 100644 --- a/src_rebuild/Game/C/felony.c +++ b/src_rebuild/Game/C/felony.c @@ -15,6 +15,9 @@ short initialOccurrenceDelay[12] = { 24, 0, 0, 0, 0, 0, 0, 0, 24, 0, 24, 0 }; short initialReccurrenceDelay[12] = { 128, 0, 128, 64, 64, 32, 32, 0, 128, 256 }; +int CopsCanSeePlayer = 0; +short pedestrianFelony = 0; + FELONY_VALUE initialFelonyValue[12] = { { 659, 0 }, diff --git a/src_rebuild/Game/C/felony.h b/src_rebuild/Game/C/felony.h index 9d251cec..ca741729 100644 --- a/src_rebuild/Game/C/felony.h +++ b/src_rebuild/Game/C/felony.h @@ -4,6 +4,10 @@ #define FELONY_MIN_VALUE (658) #define FELONY_MAX_VALUE (4096) + +extern int CopsCanSeePlayer; +extern short pedestrianFelony; + extern FELONY_DATA felonyData; extern void InitFelonySystem(); // 0x0004D280 diff --git a/src_rebuild/Game/C/main.c b/src_rebuild/Game/C/main.c index b4ba2934..7b94ca08 100644 --- a/src_rebuild/Game/C/main.c +++ b/src_rebuild/Game/C/main.c @@ -681,9 +681,6 @@ void State_GameInit(void* param) IconsLoaded = 0; } - //gSinkingTimer = 100; - //gTimeInWater = 25; - InWater = 0; gBobIndex = 0; @@ -2475,7 +2472,9 @@ void InitGameVariables(void) variable_weather = 0; current_camera_angle = 2048; gDieWithFade = 0; - pedestrianFelony = 0; // [A] + + pedestrianFelony = 0; // [A] reset pedestrian felony and also cop visibility state + CopsCanSeePlayer = 0; Havana3DLevelDraw = -1; diff --git a/src_rebuild/Game/C/mgeneric.c b/src_rebuild/Game/C/mgeneric.c index 8e162aa5..3c191c8f 100644 --- a/src_rebuild/Game/C/mgeneric.c +++ b/src_rebuild/Game/C/mgeneric.c @@ -4,7 +4,7 @@ #include "glaunch.h" #include "cars.h" #include "players.h" -#include "cop_ai.h" +#include "felony.h" #include "replays.h" #include "system.h" diff --git a/src_rebuild/Game/C/mission.c b/src_rebuild/Game/C/mission.c index 14dd6e83..d5060840 100644 --- a/src_rebuild/Game/C/mission.c +++ b/src_rebuild/Game/C/mission.c @@ -29,6 +29,7 @@ #include "shadow.h" #include "handling.h" #include "cutrecorder.h" +#include "felony.h" #ifndef PSX #include diff --git a/src_rebuild/Game/C/pathfind.c b/src_rebuild/Game/C/pathfind.c index 9c2459c5..842ad15d 100644 --- a/src_rebuild/Game/C/pathfind.c +++ b/src_rebuild/Game/C/pathfind.c @@ -7,6 +7,7 @@ #include "players.h" #include "cars.h" #include "camera.h" +#include "felony.h" #include "map.h" #define DEBUG_PATHFINDING_VIEW 0