mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
fix math
This commit is contained in:
parent
9397e07541
commit
9893bf999c
2 changed files with 3 additions and 2 deletions
|
|
@ -4165,8 +4165,8 @@ void K_SpawnAmps(player_t *player, UINT8 amps, mobj_t *impact)
|
|||
if (amps == 0)
|
||||
return;
|
||||
|
||||
UINT32 itemdistance = max(0, min( FRACUNIT, K_GetItemRouletteDistance(player, D_NumPlayersInRace()))); // cap this to FRACUNIT, so it doesn't wrap when turning it into fixed_t
|
||||
fixed_t itemdistmult = FRACUNIT + max( 0, min(FixedMul(FixedDiv(itemdistance<<FRACBITS, MAXAMPSCALINGDIST<<FRACBITS),FRACUNIT), FRACUNIT));
|
||||
UINT32 itemdistance = max(0, min( FRACUNIT-1, K_GetItemRouletteDistance(player, D_NumPlayersInRace()))); // cap this to FRACUNIT-1, so it doesn't wrap when turning it into fixed_t
|
||||
fixed_t itemdistmult = FRACUNIT + max( 0, min( FRACUNIT, (itemdistance<<FRACBITS) / MAXAMPSCALINGDIST));
|
||||
UINT16 scaledamps = min(amps, amps * (10 + (9-player->kartspeed) - (9-player->kartweight)) / 10);
|
||||
// Debug print for scaledamps calculation
|
||||
// CONS_Printf("K_SpawnAmps: player=%s, amps=%d, kartspeed=%d, kartweight=%d, itemdistance=%d, itemdistmult=%0.2f, statscaledamps=%d, distscaledamps=%d\n",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
svg_rocks
|
||||
|
||||
|
||||
|
||||
using link = mobj_t*;
|
||||
using each_ref = std::initializer_list<std::reference_wrapper<mobj_t*>>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue