mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'overdrive-antiscam-plusoptimizetinybit' into 'master'
Overdrive Antiscam See merge request kart-krew-dev/ring-racers-internal!2837
This commit is contained in:
commit
c24b6e5fb9
1 changed files with 7 additions and 2 deletions
|
|
@ -9711,6 +9711,7 @@ boolean K_PressingEBrake(const player_t *player)
|
||||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
const boolean onground = P_IsObjectOnGround(player->mo);
|
const boolean onground = P_IsObjectOnGround(player->mo);
|
||||||
|
const fixed_t scamming = K_PlayerScamPercentage(player, 1);
|
||||||
|
|
||||||
/* reset sprite offsets :) */
|
/* reset sprite offsets :) */
|
||||||
player->mo->sprxoff = 0;
|
player->mo->sprxoff = 0;
|
||||||
|
|
@ -10528,11 +10529,15 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->overdrive > 0 && onground == true)
|
if (player->overdrive > 0 && onground == true)
|
||||||
{
|
{
|
||||||
player->overdrive--;
|
player->overdrive--;
|
||||||
|
if (player->overdrive && scamming)
|
||||||
|
player->overdrive--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->overshield > 0 && onground == true)
|
if (player->overshield > 0 && onground == true)
|
||||||
{
|
{
|
||||||
player->overshield--;
|
player->overshield--;
|
||||||
|
if (player->overshield && scamming)
|
||||||
|
player->overshield--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -10582,7 +10587,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->invincibilitytimer && (player->ignoreAirtimeLeniency > 0 || onground == true || K_PowerUpRemaining(player, POWERUP_SMONITOR)))
|
if (player->invincibilitytimer && (player->ignoreAirtimeLeniency > 0 || onground == true || K_PowerUpRemaining(player, POWERUP_SMONITOR)))
|
||||||
{
|
{
|
||||||
player->invincibilitytimer--;
|
player->invincibilitytimer--;
|
||||||
if (player->invincibilitytimer && K_PlayerScamPercentage(player, 1))
|
if (player->invincibilitytimer && scamming)
|
||||||
player->invincibilitytimer--;
|
player->invincibilitytimer--;
|
||||||
|
|
||||||
// Extra tripwire leniency for the end of invincibility
|
// Extra tripwire leniency for the end of invincibility
|
||||||
|
|
@ -10801,7 +10806,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->growshrinktimer > 0 && (onground == true || player->ignoreAirtimeLeniency > 0))
|
if (player->growshrinktimer > 0 && (onground == true || player->ignoreAirtimeLeniency > 0))
|
||||||
{
|
{
|
||||||
player->growshrinktimer--;
|
player->growshrinktimer--;
|
||||||
if (player->growshrinktimer && K_PlayerScamPercentage(player, 1))
|
if (player->growshrinktimer && scamming)
|
||||||
player->growshrinktimer--;
|
player->growshrinktimer--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue