- fix CopCanSeePlayer not being reset

This commit is contained in:
Ilya Shurumov 2021-05-22 21:28:34 +06:00 committed by InspirationByte
parent 252c1c2aa5
commit dee3186d57
9 changed files with 15 additions and 15 deletions

View File

@ -8,15 +8,14 @@
#include "Game/C/pres.h" #include "Game/C/pres.h"
#include "Game/C/spool.h" #include "Game/C/spool.h"
#include "Game/C/cars.h" #include "Game/C/cars.h"
#include "Game/C/cop_ai.h"
#include "Game/C/draw.h" #include "Game/C/draw.h"
#include "Game/C/players.h" #include "Game/C/players.h"
#include "Game/C/glaunch.h" #include "Game/C/glaunch.h"
#include "Game/C/dr2roads.h"
#include <stdio.h> #include <stdio.h>
#include "C/felony.h"
int gDisplayDrawStats = 0; int gDisplayDrawStats = 0;

View File

@ -40,9 +40,6 @@ COP_DATA gCopData = {
int speed1[] = { 203, 210, 217 }; int speed1[] = { 203, 210, 217 };
int speed2[] = { 238, 266, 294 }; int speed2[] = { 238, 266, 294 };
int CopsCanSeePlayer = 0;
short pedestrianFelony = 0;
int numRoadblockCars = 0; int numRoadblockCars = 0;
int roadblockCount = 0; int roadblockCount = 0;
int copsAreInPursuit = 0; int copsAreInPursuit = 0;
@ -308,7 +305,6 @@ void InitCops(void)
OutOfSightCount = 0; OutOfSightCount = 0;
cop_respawn_timer = 0; cop_respawn_timer = 0;
CopsCanSeePlayer = 0;
CarTail.vx = 0; CarTail.vx = 0;
CarTail.vy = 0; CarTail.vy = 0;

View File

@ -5,9 +5,6 @@ extern COP_DATA gCopData;
extern COP_SIGHT_DATA copSightData; extern COP_SIGHT_DATA copSightData;
extern VECTOR roadblockLoc; extern VECTOR roadblockLoc;
extern int CopsCanSeePlayer;
extern short pedestrianFelony;
extern int numRoadblockCars; extern int numRoadblockCars;
extern int roadblockCount; extern int roadblockCount;
extern int copsAreInPursuit; extern int copsAreInPursuit;

View File

@ -15,6 +15,9 @@
short initialOccurrenceDelay[12] = { 24, 0, 0, 0, 0, 0, 0, 0, 24, 0, 24, 0 }; 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 }; short initialReccurrenceDelay[12] = { 128, 0, 128, 64, 64, 32, 32, 0, 128, 256 };
int CopsCanSeePlayer = 0;
short pedestrianFelony = 0;
FELONY_VALUE initialFelonyValue[12] = FELONY_VALUE initialFelonyValue[12] =
{ {
{ 659, 0 }, { 659, 0 },

View File

@ -4,6 +4,10 @@
#define FELONY_MIN_VALUE (658) #define FELONY_MIN_VALUE (658)
#define FELONY_MAX_VALUE (4096) #define FELONY_MAX_VALUE (4096)
extern int CopsCanSeePlayer;
extern short pedestrianFelony;
extern FELONY_DATA felonyData; extern FELONY_DATA felonyData;
extern void InitFelonySystem(); // 0x0004D280 extern void InitFelonySystem(); // 0x0004D280

View File

@ -681,9 +681,6 @@ void State_GameInit(void* param)
IconsLoaded = 0; IconsLoaded = 0;
} }
//gSinkingTimer = 100;
//gTimeInWater = 25;
InWater = 0; InWater = 0;
gBobIndex = 0; gBobIndex = 0;
@ -2475,7 +2472,9 @@ void InitGameVariables(void)
variable_weather = 0; variable_weather = 0;
current_camera_angle = 2048; current_camera_angle = 2048;
gDieWithFade = 0; gDieWithFade = 0;
pedestrianFelony = 0; // [A]
pedestrianFelony = 0; // [A] reset pedestrian felony and also cop visibility state
CopsCanSeePlayer = 0;
Havana3DLevelDraw = -1; Havana3DLevelDraw = -1;

View File

@ -4,7 +4,7 @@
#include "glaunch.h" #include "glaunch.h"
#include "cars.h" #include "cars.h"
#include "players.h" #include "players.h"
#include "cop_ai.h" #include "felony.h"
#include "replays.h" #include "replays.h"
#include "system.h" #include "system.h"

View File

@ -29,6 +29,7 @@
#include "shadow.h" #include "shadow.h"
#include "handling.h" #include "handling.h"
#include "cutrecorder.h" #include "cutrecorder.h"
#include "felony.h"
#ifndef PSX #ifndef PSX
#include <stdint.h> #include <stdint.h>

View File

@ -7,6 +7,7 @@
#include "players.h" #include "players.h"
#include "cars.h" #include "cars.h"
#include "camera.h" #include "camera.h"
#include "felony.h"
#include "map.h" #include "map.h"
#define DEBUG_PATHFINDING_VIEW 0 #define DEBUG_PATHFINDING_VIEW 0