mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 18:32:42 +01:00
- fixed destroyed mission car not able to fail the mission
This commit is contained in:
parent
951f26d2f6
commit
5d7f77ce6a
@ -2459,29 +2459,38 @@ int MRProcessTarget(MR_THREAD *thread, MS_TARGET *target)
|
||||
if (gCurrentMissionNumber == 11 ||
|
||||
gCurrentMissionNumber == 14 ||
|
||||
gCurrentMissionNumber == 19 ||
|
||||
gCurrentMissionNumber == 28 ||
|
||||
cp->totalDamage < MaxPlayerDamage[0])
|
||||
gCurrentMissionNumber == 26 ||
|
||||
gCurrentMissionNumber == 28)
|
||||
{
|
||||
// Find the Clue and Steal the keys
|
||||
int failIfDamaged;
|
||||
|
||||
failIfDamaged = (gCurrentMissionNumber != 14 && gCurrentMissionNumber != 28);
|
||||
|
||||
// check if player entered the car
|
||||
if (player[0].playerCarId == slot)
|
||||
{
|
||||
car_data[player[0].playerCarId].inform = NULL;
|
||||
cp->inform = NULL;
|
||||
|
||||
if (gCurrentMissionNumber == 14 || gCurrentMissionNumber == 28)
|
||||
// signal to mission about stolen car so Find the Clue/Steal the keys can progress
|
||||
if (!failIfDamaged)
|
||||
{
|
||||
cp->totalDamage = MaxPlayerDamage[0];
|
||||
|
||||
ret = 1;
|
||||
|
||||
if (MaxPlayerDamage[0] <= cp->totalDamage)
|
||||
gGotInStolenCar = 1;
|
||||
}
|
||||
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
// check if target car is damaged
|
||||
if(failIfDamaged && cp->totalDamage >= MaxPlayerDamage[0])
|
||||
{
|
||||
message = MissionStrings + MissionHeader->msgCarWrecked;
|
||||
|
||||
SetPlayerMessage(thread->player, message, 2, 1);
|
||||
SetMissionFailed(FAILED_MESSAGESET);
|
||||
}
|
||||
}
|
||||
|
||||
message = MissionStrings + MissionHeader->msgCarWrecked;
|
||||
|
||||
SetPlayerMessage(thread->player, message, 2, 1);
|
||||
SetMissionFailed(FAILED_MESSAGESET);
|
||||
break;
|
||||
}
|
||||
case 64:
|
||||
@ -2889,20 +2898,17 @@ int HandleGameOver(void)
|
||||
if (tannerDeathTimer == 64)
|
||||
lp->dying = 1;
|
||||
|
||||
if (lp->dying != 0)
|
||||
if (lp->dying && !gGotInStolenCar)
|
||||
{
|
||||
if (gGotInStolenCar == 0)
|
||||
{
|
||||
if (Mission.timer[player_id].flags & TIMER_FLAG_BOMB_COUNTDOWN)
|
||||
BombThePlayerToHellAndBack(gCarWithABerm);
|
||||
if (Mission.timer[player_id].flags & TIMER_FLAG_BOMB_COUNTDOWN)
|
||||
BombThePlayerToHellAndBack(gCarWithABerm);
|
||||
|
||||
if (lp->playerType == 2)
|
||||
SetPlayerMessage(player_id, MissionStrings + MissionHeader->msgDrowned, 2, 2);
|
||||
else
|
||||
SetPlayerMessage(player_id, MissionStrings + MissionHeader->msgCarWrecked, 2, 2);
|
||||
if (lp->playerType == 2)
|
||||
SetPlayerMessage(player_id, MissionStrings + MissionHeader->msgDrowned, 2, 2);
|
||||
else
|
||||
SetPlayerMessage(player_id, MissionStrings + MissionHeader->msgCarWrecked, 2, 2);
|
||||
|
||||
lp->dying++;
|
||||
}
|
||||
lp->dying++;
|
||||
}
|
||||
|
||||
if (lp->dying > 40)
|
||||
|
Loading…
Reference in New Issue
Block a user