mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Nights LE checkpoint
This commit is contained in:
parent
aad441ff74
commit
e28d30e1ee
3 changed files with 57 additions and 2 deletions
|
|
@ -905,7 +905,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetTarget(&thing->target, tmthing);
|
P_SetTarget(&thing->target, tmthing);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Respawn rings and items
|
// NiGHTS lap logic
|
||||||
if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE)
|
if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE)
|
||||||
&& (tmthing->player || thing->player))
|
&& (tmthing->player || thing->player))
|
||||||
{
|
{
|
||||||
|
|
@ -921,8 +921,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
^ (droneobj->extravalue1 >= 90 && droneobj->extravalue1 <= 270)
|
^ (droneobj->extravalue1 >= 90 && droneobj->extravalue1 <= 270)
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
// Reload all the fancy ring stuff!
|
// Respawn rings and items
|
||||||
P_ReloadRings();
|
P_ReloadRings();
|
||||||
|
|
||||||
|
// \todo store current lap in player mobj
|
||||||
|
P_RunNightsLapExecutors(pl->mo);
|
||||||
}
|
}
|
||||||
droneobj->extravalue1 = pl->anotherflyangle;
|
droneobj->extravalue1 = pl->anotherflyangle;
|
||||||
droneobj->extravalue2 = (INT32)leveltime + TICRATE;
|
droneobj->extravalue2 = (INT32)leveltime + TICRATE;
|
||||||
|
|
|
||||||
48
src/p_spec.c
48
src/p_spec.c
|
|
@ -5487,6 +5487,48 @@ static void P_RunLevelLoadExecutors(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_RunNightserizeExecutors
|
||||||
|
//
|
||||||
|
static void P_RunNightserizeExecutors(mobj_t *actor)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < numlines; i++)
|
||||||
|
{
|
||||||
|
if (lines[i].special == 323 || lines[i].special == 324)
|
||||||
|
P_RunTriggerLinedef(&lines[i], actor, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_RunDeNightserizeExecutors
|
||||||
|
//
|
||||||
|
static void P_RunDeNightserizeExecutors(mobj_t *actor)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < numlines; i++)
|
||||||
|
{
|
||||||
|
if (lines[i].special == 325 || lines[i].special == 326)
|
||||||
|
P_RunTriggerLinedef(&lines[i], actor, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_RunNightsLapExecutors
|
||||||
|
//
|
||||||
|
static void P_RunNightsLapExecutors(mobj_t *actor)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < numlines; i++)
|
||||||
|
{
|
||||||
|
if (lines[i].special == 327 || lines[i].special == 328)
|
||||||
|
P_RunTriggerLinedef(&lines[i], actor, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Before things are loaded, initialises certain stuff in case they're needed
|
/** Before things are loaded, initialises certain stuff in case they're needed
|
||||||
* by P_ResetDynamicSlopes or P_LoadThings. This was split off from
|
* by P_ResetDynamicSlopes or P_LoadThings. This was split off from
|
||||||
* P_SpawnSpecials, in case you couldn't tell.
|
* P_SpawnSpecials, in case you couldn't tell.
|
||||||
|
|
@ -6408,6 +6450,12 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// NiGHTS trigger executors
|
||||||
|
case 323:
|
||||||
|
case 324:
|
||||||
|
case 325:
|
||||||
|
break;
|
||||||
|
|
||||||
case 399: // Linedef execute on map load
|
case 399: // Linedef execute on map load
|
||||||
// This is handled in P_RunLevelLoadExecutors.
|
// This is handled in P_RunLevelLoadExecutors.
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -636,6 +636,8 @@ static void P_DeNightserizePlayer(player_t *player)
|
||||||
|
|
||||||
// Restore from drowning music
|
// Restore from drowning music
|
||||||
P_RestoreMusic(player);
|
P_RestoreMusic(player);
|
||||||
|
|
||||||
|
P_RunDeNightserizeExecutors();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -771,6 +773,8 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
||||||
}
|
}
|
||||||
|
|
||||||
player->powers[pw_carry] = CR_NIGHTSMODE;
|
player->powers[pw_carry] = CR_NIGHTSMODE;
|
||||||
|
|
||||||
|
P_RunNightserizeExecutors(player->mo);
|
||||||
}
|
}
|
||||||
|
|
||||||
pflags_t P_GetJumpFlags(player_t *player)
|
pflags_t P_GetJumpFlags(player_t *player)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue