mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Waypoint flag to block lightsnake
This commit is contained in:
parent
63bda6076f
commit
38aa1f9d6b
3 changed files with 14 additions and 5 deletions
|
|
@ -413,7 +413,7 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
|
||||||
{
|
{
|
||||||
size_t nwp = K_NextRespawnWaypointIndex(player->respawn.wp);
|
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;
|
player->respawn.state = RESPAWNST_DROP;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -13527,6 +13527,14 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj)
|
||||||
{
|
{
|
||||||
mobj->extravalue2 = 0;
|
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
|
// 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);
|
P_SetTarget(&mobj->tracer, waypointcap);
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,11 @@ typedef enum
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TMWPF_DISABLED = 1,
|
TMWPF_DISABLED = 1,
|
||||||
TMWPF_SHORTCUT = 1<<1,
|
TMWPF_SHORTCUT = 1<<1,
|
||||||
TMWPF_NORESPAWN = 1<<2,
|
TMWPF_NORESPAWN = 1<<2,
|
||||||
TMWPF_FINISHLINE = 1<<3,
|
TMWPF_FINISHLINE = 1<<3,
|
||||||
|
TMWPF_BLOCKLIGHTSNAKE = 1<<4
|
||||||
} textmapwaypointflags_t;
|
} textmapwaypointflags_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue