mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +00:00
Reverted wipeout
This commit is contained in:
parent
b6d86145a9
commit
f69270027c
10 changed files with 15 additions and 83 deletions
|
@ -276,7 +276,6 @@ typedef enum
|
|||
k_goldshroomtimer, // Gold Mushroom duration timer
|
||||
k_startimer, // Invincibility timer
|
||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
k_wipeouttimer, // Wipe-out from a shell, waits a short amount of time before making you stop and spinning out in place
|
||||
k_laserwisptimer, // The duration and relative angle of the laser
|
||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Star, Megashroom)
|
||||
|
|
|
@ -7357,7 +7357,6 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"GOLDSHROOMTIMER",
|
||||
"STARTIMER",
|
||||
"SPINOUTTIMER",
|
||||
"WIPEOUTTIMER",
|
||||
"LASERWISPTIMER",
|
||||
"JUSTBUMPED",
|
||||
"POWERITEMTIMER",
|
||||
|
|
|
@ -405,7 +405,6 @@ extern INT32 boostealtime;
|
|||
extern INT32 mushroomtime;
|
||||
extern INT32 itemtime;
|
||||
extern INT32 comebacktime;
|
||||
extern INT32 wipeouttime;
|
||||
|
||||
extern UINT8 introtoplay;
|
||||
extern UINT8 creditscutscene;
|
||||
|
|
|
@ -206,7 +206,6 @@ INT32 boostealtime = TICRATE/2;
|
|||
INT32 mushroomtime = TICRATE + (TICRATE/3);
|
||||
INT32 itemtime = 8*TICRATE;
|
||||
INT32 comebacktime = 10*TICRATE;
|
||||
INT32 wipeouttime = 20;
|
||||
|
||||
INT32 gameovertics = 15*TICRATE;
|
||||
|
||||
|
|
66
src/k_kart.c
66
src/k_kart.c
|
@ -1456,23 +1456,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_spinout] == 0 && player->kartstuff[k_spinouttimer] == 0 && player->powers[pw_flashing] == K_GetKartFlashing())
|
||||
player->powers[pw_flashing]--;
|
||||
|
||||
if (player->kartstuff[k_wipeouttimer])
|
||||
{
|
||||
if (player->kartstuff[k_wipeouttimer] == 1)
|
||||
{
|
||||
if (P_IsObjectOnGround(player->mo))
|
||||
{
|
||||
player->kartstuff[k_wipeouttimer] = 0;
|
||||
P_PlayRinglossSound(player->mo);
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
K_SpinPlayer(player, NULL);
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
player->kartstuff[k_wipeouttimer]--;
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_magnettimer])
|
||||
player->kartstuff[k_magnettimer]--;
|
||||
|
||||
|
@ -1816,7 +1799,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
return;
|
||||
|
||||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || (player->kartstuff[k_spinouttimer] > 0 && player->kartstuff[k_spinout] > 0)
|
||||
|| player->kartstuff[k_wipeouttimer] > 0 || player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| (gametype != GT_RACE && ((player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
return;
|
||||
|
||||
|
@ -1874,48 +1857,13 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
return;
|
||||
}
|
||||
|
||||
void K_WipeoutPlayer(player_t *player, mobj_t *source)
|
||||
{
|
||||
if (player->health <= 0)
|
||||
return;
|
||||
|
||||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || (player->kartstuff[k_spinouttimer] > 0 && player->kartstuff[k_spinout] > 0)
|
||||
|| player->kartstuff[k_wipeouttimer] > 0 || player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| (gametype != GT_RACE && ((player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
return;
|
||||
|
||||
if (source && source != player->mo && source->player && !source->player->kartstuff[k_sounds])
|
||||
{
|
||||
S_StartSound(source, sfx_hitem);
|
||||
source->player->kartstuff[k_sounds] = 50;
|
||||
}
|
||||
|
||||
if (gametype != GT_RACE)
|
||||
{
|
||||
if (source && source->player && player != source->player)
|
||||
P_AddPlayerScore(source->player, 1);
|
||||
}
|
||||
|
||||
P_PlayerRingBurst(player, 5);
|
||||
|
||||
if (P_IsLocalPlayer(player))
|
||||
{
|
||||
quake.intensity = 32*FRACUNIT;
|
||||
quake.time = 5;
|
||||
}
|
||||
|
||||
player->kartstuff[k_wipeouttimer] = wipeouttime+1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void K_SquishPlayer(player_t *player, mobj_t *source)
|
||||
{
|
||||
if (player->health <= 0)
|
||||
return;
|
||||
|
||||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_startimer] > 0
|
||||
|| player->kartstuff[k_wipeouttimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| (gametype != GT_RACE && ((player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
return;
|
||||
|
||||
|
@ -1959,7 +1907,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
|
|||
return;
|
||||
|
||||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || (player->kartstuff[k_spinouttimer] > 0 && player->kartstuff[k_spinout] > 0)
|
||||
|| player->kartstuff[k_wipeouttimer] > 0 || player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| (gametype != GT_RACE && ((player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
return;
|
||||
|
||||
|
@ -2038,10 +1986,10 @@ void K_StealBalloon(player_t *player, player_t *victim, boolean force)
|
|||
return;
|
||||
|
||||
if ((player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || (player->kartstuff[k_spinouttimer] > 0 && player->kartstuff[k_spinout] > 0)
|
||||
|| player->kartstuff[k_wipeouttimer] > 0 || player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| (player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer]))
|
||||
|| (victim->powers[pw_flashing] > 0 || victim->kartstuff[k_squishedtimer] > 0 || (victim->kartstuff[k_spinouttimer] > 0 && victim->kartstuff[k_spinout] > 0)
|
||||
|| victim->kartstuff[k_wipeouttimer] > 0 || victim->kartstuff[k_startimer] > 0 || victim->kartstuff[k_growshrinktimer] > 0 || victim->kartstuff[k_bootimer] > 0))
|
||||
|| victim->kartstuff[k_startimer] > 0 || victim->kartstuff[k_growshrinktimer] > 0 || victim->kartstuff[k_bootimer] > 0))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2915,7 +2863,7 @@ static void K_KartDrift(player_t *player, boolean onground)
|
|||
}
|
||||
|
||||
// Stop drifting
|
||||
if (player->kartstuff[k_spinouttimer] > 0 || player->kartstuff[k_wipeouttimer] > 0 // banana peel
|
||||
if (player->kartstuff[k_spinouttimer] > 0 // banana peel
|
||||
|| player->speed < (10<<16)) // you're too slow!
|
||||
{
|
||||
player->kartstuff[k_drift] = 0;
|
||||
|
@ -3148,7 +3096,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
else if (cmd->buttons & BT_ATTACK)
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
||||
if (player && player->health > 0 && !player->spectator && !player->exiting && player->kartstuff[k_spinouttimer] == 0 && player->kartstuff[k_wipeouttimer] == 0)
|
||||
if (player && player->health > 0 && !player->spectator && !player->exiting && player->kartstuff[k_spinouttimer] == 0)
|
||||
{
|
||||
|
||||
// Magnet
|
||||
|
|
|
@ -23,7 +23,6 @@ void K_LakituChecker(player_t *player);
|
|||
void K_KartMoveAnimation(player_t *player);
|
||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||
void K_SpinPlayer(player_t *player, mobj_t *source);
|
||||
void K_WipeoutPlayer(player_t *player, mobj_t *source);
|
||||
void K_SquishPlayer(player_t *player, mobj_t *source);
|
||||
void K_ExplodePlayer(player_t *player, mobj_t *source);
|
||||
void K_StealBalloon(player_t *player, player_t *victim, boolean force);
|
||||
|
|
|
@ -3202,17 +3202,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|| inflictor->type == MT_TRIPLEREDSHIELD1 || inflictor->type == MT_TRIPLEREDSHIELD2 || inflictor->type == MT_TRIPLEREDSHIELD3
|
||||
|| inflictor->player))
|
||||
{
|
||||
fixed_t tmomx = inflictor->momx;
|
||||
fixed_t tmomy = inflictor->momy;
|
||||
fixed_t tmomz = inflictor->momz;
|
||||
|
||||
K_KartBouncing(target, inflictor, false);
|
||||
K_WipeoutPlayer(player, source);
|
||||
|
||||
inflictor->momx = tmomx;
|
||||
inflictor->momy = tmomy;
|
||||
inflictor->momz = tmomz;
|
||||
/*player->kartstuff[k_spinouttype] = 1;
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
K_SpinPlayer(player, source);
|
||||
damage = player->mo->health - 1;
|
||||
P_RingDamage(player, inflictor, source, damage);
|
||||
|
@ -3222,7 +3212,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
{
|
||||
quake.intensity = 32*FRACUNIT;
|
||||
quake.time = 5;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1627,12 +1627,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true; // underneath
|
||||
|
||||
if (thing->player->kartstuff[k_growshrinktimer] || thing->player->kartstuff[k_squishedtimer]
|
||||
|| thing->player->kartstuff[k_bootimer] || thing->player->kartstuff[k_spinouttimer] || thing->player->kartstuff[k_wipeouttimer]
|
||||
|| thing->player->kartstuff[k_bootimer] || thing->player->kartstuff[k_spinouttimer]
|
||||
|| thing->player->kartstuff[k_startimer] || thing->player->kartstuff[k_justbumped]
|
||||
|| (gametype != GT_RACE && (thing->player->kartstuff[k_balloon] <= 0
|
||||
&& (thing->player->kartstuff[k_comebacktimer] || thing->player->kartstuff[k_comebackmode] == 1)))
|
||||
|| tmthing->player->kartstuff[k_growshrinktimer] || tmthing->player->kartstuff[k_squishedtimer]
|
||||
|| tmthing->player->kartstuff[k_bootimer] || tmthing->player->kartstuff[k_spinouttimer] || tmthing->player->kartstuff[k_wipeouttimer]
|
||||
|| tmthing->player->kartstuff[k_bootimer] || tmthing->player->kartstuff[k_spinouttimer]
|
||||
|| tmthing->player->kartstuff[k_startimer] || tmthing->player->kartstuff[k_justbumped]
|
||||
|| (gametype != GT_RACE && (tmthing->player->kartstuff[k_balloon] <= 0
|
||||
&& (tmthing->player->kartstuff[k_comebacktimer] || tmthing->player->kartstuff[k_comebackmode] == 1))))
|
||||
|
|
|
@ -2867,7 +2867,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
|||
// Cut momentum in half when you hit the ground and
|
||||
// aren't pressing any controls.
|
||||
if (!(mo->player->cmd.forwardmove || mo->player->cmd.sidemove) && !mo->player->cmomx && !mo->player->cmomy
|
||||
&& !(mo->player->pflags & PF_SPINNING) && !(mo->player->kartstuff[k_spinouttimer] || mo->player->kartstuff[k_wipeouttimer]))
|
||||
&& !(mo->player->pflags & PF_SPINNING) && !(mo->player->kartstuff[k_spinouttimer]))
|
||||
{
|
||||
mo->momx = mo->momx/2;
|
||||
mo->momy = mo->momy/2;
|
||||
|
|
|
@ -3665,7 +3665,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
if (!player->jumpfactor)
|
||||
return;
|
||||
|
||||
if (player->kartstuff[k_spinouttimer] || player->kartstuff[k_wipeouttimer]) // SRB2kart
|
||||
if (player->kartstuff[k_spinouttimer]) // SRB2kart
|
||||
return;
|
||||
|
||||
/* // SRB2kart - climbing in a kart?
|
||||
|
@ -4636,8 +4636,7 @@ static void P_3dMovement(player_t *player)
|
|||
|
||||
cmd = &player->cmd;
|
||||
|
||||
if (player->exiting || player->pflags & PF_STASIS
|
||||
|| player->kartstuff[k_spinouttimer] || player->kartstuff[k_wipeouttimer]) // pw_introcam?
|
||||
if (player->exiting || player->pflags & PF_STASIS || player->kartstuff[k_spinouttimer]) // pw_introcam?
|
||||
{
|
||||
cmd->forwardmove = cmd->sidemove = 0;
|
||||
if (player->pflags & PF_GLIDING)
|
||||
|
@ -4869,7 +4868,7 @@ static void P_3dMovement(player_t *player)
|
|||
P_Thrust(player->mo, movepushangle, movepushforward);
|
||||
#endif
|
||||
}
|
||||
else if (!(player->kartstuff[k_spinouttimer] || player->kartstuff[k_wipeouttimer]))
|
||||
else if (!(player->kartstuff[k_spinouttimer]))
|
||||
{
|
||||
K_MomentumToFacing(player);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue