From a0034750764e665faeec46a9fa4298956e37de36 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 31 Aug 2022 16:37:52 -0700 Subject: [PATCH] Use mapobjectscale in K_FakeBotResults Fixes a crash if bot scale is way too small and should be more consistent? --- src/k_grandprix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_grandprix.c b/src/k_grandprix.c index 740730c6f..077532fa3 100644 --- a/src/k_grandprix.c +++ b/src/k_grandprix.c @@ -639,7 +639,7 @@ void K_RetireBots(void) --------------------------------------------------*/ void K_FakeBotResults(player_t *bot) { - const UINT32 distfactor = FixedMul(32 * bot->mo->scale, K_GetKartGameSpeedScalar(gamespeed)) / FRACUNIT; + const UINT32 distfactor = FixedMul(32 * mapobjectscale, K_GetKartGameSpeedScalar(gamespeed)) / FRACUNIT; UINT32 worstdist = 0; tic_t besttime = UINT32_MAX; UINT8 numplayers = 0;