mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-25 23:11:20 +00:00
Merge branch 'respawn-intangible' into 'master'
Make player impervious to damage while respawning, don't let them use items Closes #328 See merge request KartKrew/Kart!994
This commit is contained in:
commit
36b5ba385a
3 changed files with 12 additions and 2 deletions
|
|
@ -10099,7 +10099,7 @@ void K_UnsetItemOut(player_t *player)
|
|||
void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||
{
|
||||
ticcmd_t *cmd = &player->cmd;
|
||||
boolean ATTACK_IS_DOWN = ((cmd->buttons & BT_ATTACK) && !(player->oldcmd.buttons & BT_ATTACK));
|
||||
boolean ATTACK_IS_DOWN = ((cmd->buttons & BT_ATTACK) && !(player->oldcmd.buttons & BT_ATTACK) && (player->respawn.state == RESPAWNST_NONE));
|
||||
boolean HOLDING_ITEM = (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT));
|
||||
boolean NO_HYUDORO = (player->stealingtimer == 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -344,7 +344,10 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
|
|||
|
||||
player->mo->momx = player->mo->momy = player->mo->momz = 0;
|
||||
|
||||
player->flashing = 2;
|
||||
// 3 because this timer counts down afterward, in
|
||||
// P_PlayerThink. flashing must be > 1 after it has
|
||||
// counted down in order to flicker the player sprite.
|
||||
player->flashing = 3;
|
||||
//player->nocontrol = max(2, player->nocontrol);
|
||||
|
||||
if (leveltime % 8 == 0 && !mapreset)
|
||||
|
|
@ -813,6 +816,7 @@ void K_RespawnChecker(player_t *player)
|
|||
return;
|
||||
case RESPAWNST_DROP:
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
player->flashing = 3;
|
||||
if (player->respawn.timer > 0)
|
||||
{
|
||||
player->mo->momz = 0;
|
||||
|
|
|
|||
|
|
@ -1911,6 +1911,12 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
|
|||
{
|
||||
(void)source;
|
||||
|
||||
if (player->respawn.state != RESPAWNST_NONE)
|
||||
{
|
||||
K_DoInstashield(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!player->exiting && specialstageinfo.valid == true)
|
||||
{
|
||||
player->pflags |= PF_NOCONTEST;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue