Only Run patch waypoint functionality on patched maps
The Wiki says its only active on patched maps, so I'm acutally making that true.
This commit is contained in:
parent
0239543d3f
commit
4beb4e6f02
3 changed files with 15 additions and 1 deletions
11
src/k_kart.c
11
src/k_kart.c
|
|
@ -11018,6 +11018,17 @@ boolean K_UsingLegacyCheckpoints(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean K_UsingPatchedMap(void)
|
||||
{
|
||||
if (patch_version)
|
||||
{
|
||||
// This map has been patched!
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void K_UpdateMobjItemOverlay(mobj_t *part, SINT8 itemType, UINT8 itemCount)
|
||||
{
|
||||
switch (itemType)
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ boolean K_SlipdashActive(void);
|
|||
boolean K_BoostChain(player_t *player, INT32 timer, boolean chainsound);
|
||||
INT32 K_ChainOrDeincrementTime(player_t *player, INT32 timer, INT32 deincrement, boolean chainsound);
|
||||
boolean K_UsingLegacyCheckpoints(void);
|
||||
boolean K_UsingPatchedMap(void);
|
||||
|
||||
void K_UpdateMobjItemOverlay(mobj_t *part, SINT8 itemType, UINT8 itemCount);
|
||||
|
||||
|
|
|
|||
|
|
@ -13139,6 +13139,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
mobj->threshold = mthing->args[0];
|
||||
|
||||
mobj->movecount = tag;
|
||||
|
||||
if (mthing->args[2] & TMWPF_DISABLED)
|
||||
{
|
||||
mobj->extravalue1 = 0; // The waypoint is disabled if extra is on
|
||||
|
|
@ -13163,6 +13164,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
{
|
||||
mobj->reactiontime = 1;
|
||||
}
|
||||
|
||||
if (mthing->args[2] & TMWPF_FINISHLINE)
|
||||
{
|
||||
mobj->extravalue2 = 1; // args[2] of 1 means the waypoint is at the finish line
|
||||
|
|
@ -13170,7 +13172,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
|
||||
line_t *finishline = P_FindNearestLine(mobj->x, mobj->y,
|
||||
mobj->subsector->sector, -1);
|
||||
if (finishline != NULL)
|
||||
if (K_UsingPatchedMap() && finishline != NULL)
|
||||
{
|
||||
P_UnsetThingPosition(mobj);
|
||||
P_ClosestPointOnLine(mobj->x, mobj->y, finishline, (vertex_t *)&mobj->x);
|
||||
|
|
|
|||
Loading…
Reference in a new issue