mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Vibetweaking
This commit is contained in:
parent
d5f131dcc2
commit
c7fcf34a8a
4 changed files with 4 additions and 15 deletions
|
|
@ -3307,19 +3307,13 @@ static void K_drawKartEmeralds(void)
|
||||||
|
|
||||||
INT32 K_GetTransFlagFromFixed(fixed_t value, boolean midrace)
|
INT32 K_GetTransFlagFromFixed(fixed_t value, boolean midrace)
|
||||||
{
|
{
|
||||||
fixed_t base = midrace ? GRADINGFACTORSOFTCAP : FRACUNIT;
|
fixed_t base = FRACUNIT;
|
||||||
|
|
||||||
value = std::clamp(value, base - FRACUNIT/2, base + FRACUNIT/2);
|
value = std::clamp(value, base - FRACUNIT/2, base + FRACUNIT/2);
|
||||||
|
|
||||||
// Calculate distance from "base""
|
// Calculate distance from "base""
|
||||||
fixed_t distance = abs(base - value);
|
fixed_t distance = abs(base - value);
|
||||||
|
|
||||||
if (midrace)
|
|
||||||
{
|
|
||||||
if (value > base)
|
|
||||||
distance = FixedMul(distance, GRADINGFACTORCAPSTRENGTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
distance = std::clamp(distance, 0, FRACUNIT/2);
|
distance = std::clamp(distance, 0, FRACUNIT/2);
|
||||||
|
|
||||||
// Map the distance to 0-10 range (10 = closest to 1.0, 0 = farthest from 1.0)
|
// Map the distance to 0-10 range (10 = closest to 1.0, 0 = farthest from 1.0)
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,8 @@ fixed_t K_EffectiveGradingFactor(const player_t *player)
|
||||||
return min;
|
return min;
|
||||||
|
|
||||||
fixed_t gf = player->gradingfactor;
|
fixed_t gf = player->gradingfactor;
|
||||||
|
if (franticitems)
|
||||||
if (gf > GRADINGFACTORSOFTCAP && !K_PlayerUsesBotMovement(player))
|
gf = (gf + FRACUNIT)/2;
|
||||||
gf = GRADINGFACTORSOFTCAP + FixedDiv(gf - GRADINGFACTORSOFTCAP, GRADINGFACTORCAPSTRENGTH);
|
|
||||||
|
|
||||||
gf = (gf + FRACUNIT)/2;
|
|
||||||
|
|
||||||
return max(min, gf);
|
return max(min, gf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,6 @@ fixed_t K_FinalCheckpointPower(void);
|
||||||
fixed_t K_EffectiveGradingFactor(const player_t *player);
|
fixed_t K_EffectiveGradingFactor(const player_t *player);
|
||||||
#define MINGRADINGFACTOR (FRACUNIT/2)
|
#define MINGRADINGFACTOR (FRACUNIT/2)
|
||||||
#define MINFRANTICFACTOR (8*FRACUNIT/10)
|
#define MINFRANTICFACTOR (8*FRACUNIT/10)
|
||||||
#define GRADINGFACTORSOFTCAP (2*FRACUNIT)
|
|
||||||
#define GRADINGFACTORCAPSTRENGTH (3*FRACUNIT)
|
|
||||||
|
|
||||||
void K_TimerReset(void);
|
void K_TimerReset(void);
|
||||||
void K_TimerInit(void);
|
void K_TimerInit(void);
|
||||||
|
|
|
||||||
|
|
@ -1457,7 +1457,7 @@ void K_FillItemRouletteData(player_t *player, itemroulette_t *const roulette, bo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t largegamescaler = roulette->playing * 5 + 100; // Spread out item odds in large games for a less insane experience.
|
fixed_t largegamescaler = roulette->playing * 8 + 100; // Spread out item odds in large games for a less insane experience.
|
||||||
if (franticitems)
|
if (franticitems)
|
||||||
largegamescaler = 100; // Except in Frantic, where you know what you're getting
|
largegamescaler = 100; // Except in Frantic, where you know what you're getting
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue