mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-04 14:12:41 +00:00
Coherency changes to special stage behaviour in anticipation of timeattack support
* Make everyone PF_NOCONTEST (but not explode) if the UFO/emerald reaches the end of its waypoint path.
- Possibly temporary: Make the UFO/emerald go straight up at its final waypoint
* If you have PF_NOCONTEST, K_IsPlayerLosing is true
* If special stage in action and the only reason you'd be behind is your position, nobody loses
* Never eliminate last in special stage
* Time Over funny camera no longer occurs when PF_NOCONTEST but not dead
This commit is contained in:
parent
03c8fd543f
commit
15587417c7
4 changed files with 44 additions and 10 deletions
|
|
@ -372,6 +372,9 @@ boolean K_IsPlayerLosing(player_t *player)
|
|||
INT32 winningpos = 1;
|
||||
UINT8 i, pcount = 0;
|
||||
|
||||
if (player->pflags & PF_NOCONTEST)
|
||||
return true;
|
||||
|
||||
if (battlecapsules && numtargets == 0)
|
||||
return true; // Didn't even TRY?
|
||||
|
||||
|
|
@ -381,6 +384,9 @@ boolean K_IsPlayerLosing(player_t *player)
|
|||
if (player->position == 1)
|
||||
return false;
|
||||
|
||||
if (specialstageinfo.valid == true)
|
||||
return false; // anything short of DNF is COOL
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
|
|
@ -7567,8 +7573,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
//CONS_Printf("cam: %d, dest: %d\n", player->karthud[khud_boostcam], player->karthud[khud_destboostcam]);
|
||||
}
|
||||
|
||||
player->karthud[khud_timeovercam] = 0;
|
||||
|
||||
// Make ABSOLUTELY SURE that your flashing tics don't get set WHILE you're still in hit animations.
|
||||
if (player->spinouttimer != 0 || player->wipeoutslow != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -281,10 +281,11 @@ static void UFOMove(mobj_t *ufo)
|
|||
if (curWaypoint == NULL || destWaypoint == NULL)
|
||||
{
|
||||
// Waypoints aren't valid.
|
||||
// Just stand still.
|
||||
// Just go straight up.
|
||||
// :japanese_ogre: : "Abrupt and funny is the funniest way to end the special stage anyways"
|
||||
ufo->momx = 0;
|
||||
ufo->momy = 0;
|
||||
ufo->momz = 0;
|
||||
ufo->momz = ufo_speed(ufo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -365,8 +366,23 @@ static void UFOMove(mobj_t *ufo)
|
|||
|
||||
if (reachedEnd == true)
|
||||
{
|
||||
CONS_Printf("You lost...\n");
|
||||
ufo_waypoint(ufo) = -1; // Invalidate
|
||||
UINT8 i;
|
||||
|
||||
// Invalidate UFO/emerald
|
||||
ufo_waypoint(ufo) = -1;
|
||||
ufo->flags &= ~(MF_SPECIAL|MF_PICKUPFROMBELOW);
|
||||
|
||||
// Disable player
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
if (players[i].spectator)
|
||||
continue;
|
||||
|
||||
players[i].pflags |= PF_NOCONTEST;
|
||||
P_DoPlayerExit(&players[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (pathfindsuccess == true)
|
||||
|
|
@ -655,7 +671,10 @@ void Obj_UFOPieceThink(mobj_t *piece)
|
|||
fixed_t sc = FixedDiv(FixedDiv(ufo->ceilingz - stemZ, piece->scale), 15 * FRACUNIT);
|
||||
|
||||
UFOMoveTo(piece, ufo->x, ufo->y, stemZ);
|
||||
piece->spriteyscale = sc;
|
||||
if (sc > 0)
|
||||
{
|
||||
piece->spriteyscale = sc;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
// SRB2kart
|
||||
#include "k_kart.h"
|
||||
#include "k_battle.h"
|
||||
#include "k_specialstage.h"
|
||||
#include "k_pwrlv.h"
|
||||
#include "k_grandprix.h"
|
||||
#include "k_respawn.h"
|
||||
|
|
@ -892,7 +893,7 @@ boolean P_CheckRacers(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (numPlaying <= 1)
|
||||
if (numPlaying <= 1 || specialstageinfo.valid == true)
|
||||
{
|
||||
// Never do this without enough players.
|
||||
eliminateLast = false;
|
||||
|
|
|
|||
14
src/p_user.c
14
src/p_user.c
|
|
@ -54,6 +54,7 @@
|
|||
#include "k_bot.h"
|
||||
#include "k_grandprix.h"
|
||||
#include "k_boss.h"
|
||||
#include "k_specialstage.h"
|
||||
#include "k_terrain.h" // K_SpawnSplashForMobj
|
||||
#include "k_color.h"
|
||||
#include "k_follower.h"
|
||||
|
|
@ -1307,7 +1308,16 @@ void P_DoPlayerExit(player_t *player)
|
|||
P_EndingMusic(player);
|
||||
|
||||
if (P_CheckRacers() && !exitcountdown)
|
||||
exitcountdown = raceexittime+1;
|
||||
{
|
||||
if (specialstageinfo.valid == true && losing == true)
|
||||
{
|
||||
exitcountdown = (5*TICRATE)/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
exitcountdown = raceexittime+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((gametyperules & GTR_BUMPERS)) // Battle Mode exiting
|
||||
{
|
||||
|
|
@ -3048,7 +3058,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
return true;
|
||||
}
|
||||
|
||||
if ((player->pflags & PF_NOCONTEST) && (gametyperules & GTR_CIRCUIT)) // 1 for momentum keep, 2 for turnaround
|
||||
if ((player->pflags & PF_NOCONTEST) && (gametyperules & GTR_CIRCUIT) && player->karthud[khud_timeovercam] != 0) // 1 for momentum keep, 2 for turnaround
|
||||
timeover = (player->karthud[khud_timeovercam] > 2*TICRATE ? 2 : 1);
|
||||
else
|
||||
timeover = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue