Waypoint flag to block lightsnake

This commit is contained in:
AJ Martinez 2023-10-17 03:54:23 -07:00
parent 63bda6076f
commit 38aa1f9d6b
3 changed files with 14 additions and 5 deletions

View file

@ -413,7 +413,7 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
{
size_t nwp = K_NextRespawnWaypointIndex(player->respawn.wp);
if (nwp == SIZE_MAX)
if (nwp == SIZE_MAX || nextwaypoints[nwp]->mobj->movefactor) // movefactor: Block Lightsnake
{
player->respawn.state = RESPAWNST_DROP;
return;

View file

@ -13527,6 +13527,14 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj)
{
mobj->extravalue2 = 0;
}
if (mthing->thing_args[2] & TMWPF_BLOCKLIGHTSNAKE)
{
mobj->movefactor = 1; // If a lightsnaking player reaches here, drop instantly.
}
else
{
mobj->movefactor = 0;
}
// Sryder 2018-12-7: Grabbed this from the old MT_BOSS3WAYPOINT section so they'll be in the waypointcap instead
P_SetTarget(&mobj->tracer, waypointcap);

View file

@ -129,10 +129,11 @@ typedef enum
typedef enum
{
TMWPF_DISABLED = 1,
TMWPF_SHORTCUT = 1<<1,
TMWPF_NORESPAWN = 1<<2,
TMWPF_FINISHLINE = 1<<3,
TMWPF_DISABLED = 1,
TMWPF_SHORTCUT = 1<<1,
TMWPF_NORESPAWN = 1<<2,
TMWPF_FINISHLINE = 1<<3,
TMWPF_BLOCKLIGHTSNAKE = 1<<4
} textmapwaypointflags_t;
typedef enum