mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
[HACK] Make dashmode work again
Fixed one of Red's mistakes, and used a different struct variable for dashmode. This needs to be changed though, because everything will break if someone loads a circuit map.
This commit is contained in:
parent
c38af2c6a2
commit
95d6cba184
1 changed files with 5 additions and 2 deletions
|
|
@ -9158,7 +9158,7 @@ void P_PlayerThink(player_t *player)
|
||||||
// Dash mode ability for Metal Sonic
|
// Dash mode ability for Metal Sonic
|
||||||
if ((player->charability == CA_DASHMODE) && !(maptol & TOL_NIGHTS)) // woo, dashmode! no nights tho.
|
if ((player->charability == CA_DASHMODE) && !(maptol & TOL_NIGHTS)) // woo, dashmode! no nights tho.
|
||||||
{
|
{
|
||||||
#define dashmode player->glidetime
|
#define dashmode player->laps
|
||||||
if (player->speed >= FixedMul(skins[player->skin].normalspeed - 5*FRACUNIT, player->mo->scale) || (player->pflags & PF_STARTDASH))
|
if (player->speed >= FixedMul(skins[player->skin].normalspeed - 5*FRACUNIT, player->mo->scale) || (player->pflags & PF_STARTDASH))
|
||||||
{
|
{
|
||||||
dashmode++; // Counter. Adds 1 to dash mode per tic in top speed.
|
dashmode++; // Counter. Adds 1 to dash mode per tic in top speed.
|
||||||
|
|
@ -9168,11 +9168,14 @@ void P_PlayerThink(player_t *player)
|
||||||
else if (!(player->pflags & PF_SPINNING))
|
else if (!(player->pflags & PF_SPINNING))
|
||||||
{
|
{
|
||||||
if (dashmode > 3)
|
if (dashmode > 3)
|
||||||
dashmode = dashmode - 3; // Rather than lose it all, it gently counts back down!
|
dashmode -= 3; // Rather than lose it all, it gently counts back down!
|
||||||
else
|
else
|
||||||
dashmode = 0;
|
dashmode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dashmode > 254)
|
||||||
|
dashmode = 3*TICRATE+1;
|
||||||
|
|
||||||
if (dashmode < 3*TICRATE) // Exits Dash Mode if you drop below speed/dash counter tics. Not in the above block so it doesn't keep disabling in midair.
|
if (dashmode < 3*TICRATE) // Exits Dash Mode if you drop below speed/dash counter tics. Not in the above block so it doesn't keep disabling in midair.
|
||||||
{
|
{
|
||||||
player->normalspeed = skins[player->skin].normalspeed; // Reset to default if not capable of entering dash mode.
|
player->normalspeed = skins[player->skin].normalspeed; // Reset to default if not capable of entering dash mode.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue