RingRacers/src/k_respawn.h
toaster 2ec943a214 Several changes to respawning and race start.
* Becoming a spectator is now instant, and leaves no bumpable corpse behind.
* Players will now FAULT if they:
    * change from a spectator into a player after the initial camera turnaround but before the end of POSITION.
    * touch an instant kill FOF or get crushed during POSITION.
    * become a spectator during POSITION. (I might change this later, seems overkill)
* If you respawn during POSITION, the jingle will not restart from the beginning.
* Change the FAULT animation to match spinout/currents.
* Clean up some of the spawning code to not place spectators on the ground.
2021-02-17 21:48:09 +00:00

101 lines
2.4 KiB
C

// SONIC ROBO BLAST 2 KART
//-----------------------------------------------------------------------------
// Copyright (C) 2018-2020 by Kart Krew
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file k_respawn.h
/// \brief Respawning logic
#ifndef __K_RESPAWN__
#define __K_RESPAWN__
#include "k_waypoint.h"
#include "d_player.h"
#define RESPAWN_DIST 1024
#define RESPAWN_TIME 48
#define RESPAWNST_NONE 0
#define RESPAWNST_MOVE 1
#define RESPAWNST_DROP 2
/*--------------------------------------------------
fixed_t K_RespawnOffset(player_t *player, boolean flip);
Updates the player's flip flags, and returns a
Z offset for respawning.
Input Arguments:-
player - Player to preform this for.
flip - false for normal, true for gravity flip.
Return:-
Z position offset.
--------------------------------------------------*/
fixed_t K_RespawnOffset(player_t *player, boolean flip);
/*--------------------------------------------------
void K_DoFault(player_t *player);
Faults the specified player.
Input Arguments:-
player - Player to preform this for.
Return:-
None
--------------------------------------------------*/
void K_DoFault(player_t *player);
/*--------------------------------------------------
void K_DoIngameRespawn(player_t *player);
Starts the respawning animation for the specified player,
updating their respawn variables in preparation.
Input Arguments:-
player - Player to preform this for.
Return:-
None
--------------------------------------------------*/
void K_DoIngameRespawn(player_t *player);
/*--------------------------------------------------
size_t K_NextRespawnWaypointIndex(waypoint_t *waypoint);
Returns the index for the next respawn waypoint.
Input Arguments:-
waypoint - Waypoint to look past.
Return:-
An table index for waypoint_t -> nextwaypoints.
--------------------------------------------------*/
size_t K_NextRespawnWaypointIndex(waypoint_t *waypoint);
/*--------------------------------------------------
void K_RespawnChecker(player_t *player);
Thinker for the respawning animation.
Input Arguments:-
player - Player to preform this for.
Return:-
None
--------------------------------------------------*/
void K_RespawnChecker(player_t *player);
#endif