mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 03:42:34 +01:00
- add FELONY_ROADBLOCK_MIN_VALUE. Rename FELONY_MIN_VALUE -> FELONY_PURSUIT_MIN_VALUE
This commit is contained in:
parent
889259223a
commit
ba13f3c1bf
@ -70,7 +70,7 @@ int TannerStuckInCar(int doSpeedCheck, int player_id)
|
||||
playerFelony = &cp->felonyRating;
|
||||
}
|
||||
|
||||
if ((*playerFelony <= FELONY_MIN_VALUE || player_position_known < 1) &&
|
||||
if ((*playerFelony <= FELONY_PURSUIT_MIN_VALUE || player_position_known < 1) &&
|
||||
cp &&
|
||||
(cp->hd.wheel[1].surface & 7) != 1 &&
|
||||
(cp->hd.wheel[3].surface & 7) != 1)
|
||||
|
@ -216,7 +216,7 @@ void UpdateCopSightData(void)
|
||||
else
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*playerFelony > FELONY_MIN_VALUE)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE)
|
||||
{
|
||||
copSightData.surroundViewDistance = 5440;
|
||||
copSightData.frontViewDistance = 16320;
|
||||
@ -858,7 +858,7 @@ void ControlCopDetection(void)
|
||||
}
|
||||
|
||||
// [A] if Tanner is outside car, cops can arrest him if they are too close
|
||||
if(player[0].playerType == 2 && minDistanceToPlayer < 2048 && !player[0].dying && pedestrianFelony > FELONY_MIN_VALUE)
|
||||
if(player[0].playerType == 2 && minDistanceToPlayer < 2048 && !player[0].dying && pedestrianFelony > FELONY_PURSUIT_MIN_VALUE)
|
||||
{
|
||||
player[0].dying = 1;
|
||||
|
||||
@ -963,7 +963,7 @@ void PassiveCopTasks(CAR_DATA *cp)
|
||||
else
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*playerFelony <= FELONY_MIN_VALUE)
|
||||
if (*playerFelony <= FELONY_PURSUIT_MIN_VALUE)
|
||||
return;
|
||||
|
||||
// [A] make an ambush on player in Destroy the yard
|
||||
@ -1136,7 +1136,9 @@ void ControlCops(void)
|
||||
// play the phrases about direction
|
||||
if (first_offence == 0 && CopsCanSeePlayer && numActiveCops != 0)
|
||||
{
|
||||
if (*playerFelony > 658 && TimeSinceLastSpeech > 720 && targetVehicle->hd.speed > 20)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE &&
|
||||
TimeSinceLastSpeech > 720 &&
|
||||
targetVehicle->hd.speed > 20)
|
||||
{
|
||||
int rnd;
|
||||
heading = GetCarDirectionOfTravel(targetVehicle);
|
||||
@ -1182,7 +1184,7 @@ void ControlCops(void)
|
||||
if (CopsCanSeePlayer && OutOfSightCount < 256 || // [A] was player_position_known. Resolves speech in some missions
|
||||
player_position_known > 1 && GameType == GAME_GETAWAY)
|
||||
{
|
||||
if (*playerFelony > FELONY_MIN_VALUE)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE)
|
||||
copsWereInPursuit = 1;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ void NoteFelony(FELONY_DATA *pFelonyData, char type, short scale)
|
||||
|
||||
pFelonyData->reoccurrenceDelay[type].current = pFelonyData->reoccurrenceDelay[type].maximum;
|
||||
|
||||
if (*felony <= FELONY_MIN_VALUE)
|
||||
if (*felony <= FELONY_PURSUIT_MIN_VALUE)
|
||||
additionalFelonyPoints = pFelonyData->value[type].placid;
|
||||
else
|
||||
additionalFelonyPoints = pFelonyData->value[type].angry * pFelonyData->pursuitFelonyScale >> 0xc;
|
||||
@ -217,9 +217,9 @@ void NoteFelony(FELONY_DATA *pFelonyData, char type, short scale)
|
||||
}
|
||||
}
|
||||
|
||||
if (felonyTooLowForRoadblocks < 0x527)
|
||||
if (felonyTooLowForRoadblocks <= FELONY_ROADBLOCK_MIN_VALUE)
|
||||
{
|
||||
if (*felony > 0x526)
|
||||
if (*felony > FELONY_ROADBLOCK_MIN_VALUE)
|
||||
{
|
||||
roadblockCount = roadblockDelayDiff[gCopDifficultyLevel] + (Random2(0) & 0xff);
|
||||
}
|
||||
@ -238,7 +238,7 @@ void AdjustFelony(FELONY_DATA *pFelonyData)
|
||||
else
|
||||
felony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*felony != 0 && *felony <= FELONY_MIN_VALUE)
|
||||
if (*felony != 0 && *felony <= FELONY_PURSUIT_MIN_VALUE)
|
||||
{
|
||||
if (FelonyDecreaseTimer++ == FelonyDecreaseTime)
|
||||
{
|
||||
@ -249,7 +249,7 @@ void AdjustFelony(FELONY_DATA *pFelonyData)
|
||||
}
|
||||
else if (CopsCanSeePlayer)
|
||||
{
|
||||
if (*felony > FELONY_MIN_VALUE && FelonyIncreaseTimer++ == FelonyIncreaseTime)
|
||||
if (*felony > FELONY_PURSUIT_MIN_VALUE && FelonyIncreaseTimer++ == FelonyIncreaseTime)
|
||||
{
|
||||
(*felony)++;
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
#ifndef FELONY_H
|
||||
#define FELONY_H
|
||||
|
||||
#define FELONY_MIN_VALUE (658)
|
||||
#define FELONY_MAX_VALUE (4096)
|
||||
#define FELONY_PURSUIT_MIN_VALUE (658)
|
||||
#define FELONY_ROADBLOCK_MIN_VALUE (1318)
|
||||
|
||||
#define FELONY_MAX_VALUE (4096)
|
||||
|
||||
extern int CopsCanSeePlayer;
|
||||
extern short pedestrianFelony;
|
||||
|
@ -1289,7 +1289,7 @@ void DoDopplerSFX(void)
|
||||
else
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*playerFelony > FELONY_MIN_VALUE)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE)
|
||||
DoPoliceLoudhailer(num_noisy_cars, indexlist, car_dist);
|
||||
}
|
||||
|
||||
@ -1537,7 +1537,7 @@ void JerichoSpeak(void)
|
||||
else
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*playerFelony > FELONY_MIN_VALUE && rnd == rnd / 5 * 5)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE && rnd == rnd / 5 * 5)
|
||||
{
|
||||
if (j_said > 60)
|
||||
{
|
||||
|
@ -519,7 +519,7 @@ void GlobalTimeStep(void)
|
||||
// wake up cops if they've ben touched
|
||||
// [A] check player felony.
|
||||
// If player touch them without felony player will be charged with felony (hit cop car)
|
||||
if (numCopCars < 4 && numActiveCops < maxCopCars && GameType != GAME_GETAWAY && *felony >= FELONY_MIN_VALUE)
|
||||
if (numCopCars < 4 && numActiveCops < maxCopCars && GameType != GAME_GETAWAY && *felony >= FELONY_PURSUIT_MIN_VALUE)
|
||||
{
|
||||
if (cp->controlType == CONTROL_TYPE_PLAYER && IS_ROADBLOCK_CAR(c1))
|
||||
{
|
||||
|
@ -892,7 +892,7 @@ void StepSim(void)
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
// control cop roadblocks
|
||||
if (*playerFelony < 0x527 || numRoadblockCars != 0)
|
||||
if (*playerFelony <= FELONY_ROADBLOCK_MIN_VALUE || numRoadblockCars != 0)
|
||||
{
|
||||
if (roadblockCount != 0)
|
||||
{
|
||||
|
@ -696,7 +696,7 @@ void animate_garage_door(void)
|
||||
else
|
||||
felony = &car_data[playerCarId].felonyRating;
|
||||
|
||||
if (*felony > FELONY_MIN_VALUE)
|
||||
if (*felony > FELONY_PURSUIT_MIN_VALUE)
|
||||
{
|
||||
CurrentGarage.cop->pos = CurrentGarage.old_pos;
|
||||
CurrentGarage.cop = NULL;
|
||||
|
@ -743,7 +743,7 @@ void DisplayOverlays(void)
|
||||
else
|
||||
felony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*felony > FELONY_MIN_VALUE)
|
||||
if (*felony > FELONY_PURSUIT_MIN_VALUE)
|
||||
DrawCopIndicators();
|
||||
}
|
||||
}
|
||||
|
@ -1133,7 +1133,7 @@ void DrawOverheadMap(void)
|
||||
else
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*playerFelony > FELONY_MIN_VALUE)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE)
|
||||
FlashOverheadMap(ptab[CameraCnt & 0xf], 0, ptab[CameraCnt + 8U & 0xf]);
|
||||
}
|
||||
else
|
||||
@ -1147,7 +1147,7 @@ void DrawOverheadMap(void)
|
||||
else
|
||||
playerFelony = &car_data[player[0].playerCarId].felonyRating;
|
||||
|
||||
if (*playerFelony > FELONY_MIN_VALUE)
|
||||
if (*playerFelony > FELONY_PURSUIT_MIN_VALUE)
|
||||
flashtimer = 48;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user