mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-08 04:06:25 +00:00
UCRP_TRACKHAZARD fixes
- describe as "course hazard", not "track hazard", to match updated player-facing lingo - Add rudimentary handling to allow achievement in Prison Break, Versus
This commit is contained in:
parent
a07aeef049
commit
a15f6280d7
2 changed files with 14 additions and 2 deletions
12
src/m_cond.c
12
src/m_cond.c
|
|
@ -1817,6 +1817,16 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
|||
|
||||
case UCRP_TRACKHAZARD:
|
||||
{
|
||||
if (!(gametyperules & GTR_CIRCUIT))
|
||||
{
|
||||
// Prison Break/Versus
|
||||
|
||||
if (!player->exiting && cn->requirement == 0)
|
||||
return false;
|
||||
|
||||
return (((player->roundconditions.hittrackhazard[0] & 1) == 1) == (cn->requirement == 1));
|
||||
}
|
||||
|
||||
INT16 requiredlap = cn->extrainfo1;
|
||||
|
||||
if (requiredlap < 0)
|
||||
|
|
@ -2706,7 +2716,7 @@ static const char *M_GetConditionString(condition_t *cn)
|
|||
|
||||
case UCRP_TRACKHAZARD:
|
||||
{
|
||||
work = (cn->requirement == 1) ? "touch a track hazard" : "don't touch any track hazards";
|
||||
work = (cn->requirement == 1) ? "touch a course hazard" : "don't touch any course hazards";
|
||||
if (cn->extrainfo1 == -1)
|
||||
return va("%s%s", work, (cn->requirement == 1) ? " on every lap" : "");
|
||||
if (cn->extrainfo1 == -2)
|
||||
|
|
|
|||
|
|
@ -2986,10 +2986,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
}
|
||||
else if (!(inflictor && inflictor->player)
|
||||
&& player->laps <= numlaps
|
||||
&& !(player->exiting || player->laps > numlaps)
|
||||
&& damagetype != DMG_DEATHPIT)
|
||||
{
|
||||
// laps will never increment outside of GTR_CIRCUIT, so this is still fine
|
||||
const UINT8 requiredbit = 1<<(player->laps & 7);
|
||||
|
||||
if (!(player->roundconditions.hittrackhazard[player->laps/8] & requiredbit))
|
||||
{
|
||||
player->roundconditions.hittrackhazard[player->laps/8] |= requiredbit;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue