diff --git a/src/k_hud.c b/src/k_hud.c index 0ad2d3b3f..0deb8f0f5 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -1146,7 +1146,7 @@ enum SPEEDO_PMETERSMOL, }; -static SINT8 K_GetSpeedometerStyle(void) +static UINT8 K_GetSpeedometerStyle(void) { if (cv_newspeedometer.value == 2 && xtra_speedo) return SPEEDO_EXTRA; @@ -4397,6 +4397,9 @@ static void K_drawChallengerScreen(void) static void K_drawLapStartAnim(void) { + if (!cv_showlapemblem.value) + return; + // This is an EVEN MORE insanely complicated animation. const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation]; UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE); @@ -4440,9 +4443,10 @@ static void K_drawLapStartAnim(void) V_DrawFixedPatch(leftx, y, FRACUNIT, vflags, kp_lapanim_lap[min(progress/2, 6)], NULL); char *lapnum = va("%02d", stplyr->laps + 1); - const size_t laplength = strlen(lapnum); - for (size_t i = 0; i < laplength; i++) + const int laplength = (int)strlen(lapnum); + + for (int i = 0; i < laplength; i++) { int digit = lapnum[i] - '0'; int frame = min(2, progress/2 - 8 - (i*2)); @@ -4824,7 +4828,7 @@ void K_drawKartHUD(void) { if (stplyr->exiting) K_drawKartFinish(); - else if (stplyr->kartstuff[k_lapanimation] && !splitscreen && cv_showlapemblem.value) + else if (stplyr->kartstuff[k_lapanimation] && !splitscreen) K_drawLapStartAnim(); } diff --git a/src/p_setup.c b/src/p_setup.c index fe583b406..6d790262e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -456,10 +456,10 @@ static void P_SetupDirectionalLight(void) if (gamemap != oldmap || encoremode != oldencore || reinitmaplight) { - lighting->light_contrast = M_RandomRange(0, 58); + lighting->light_contrast = (UINT8)M_RandomRange(0, 58); lighting->sprite_backlight = 0; - lighting->use_light_angle = M_RandomRange(0, 1); // either on or off - lighting->light_angle = M_RandomRange(-382, 382); + lighting->use_light_angle = (boolean)M_RandomRange(0, 1); // either on or off + lighting->light_angle = (angle_t)M_RandomRange(-382, 382); reinitmaplight = false; } diff --git a/src/s_sound.c b/src/s_sound.c index a95fc39c0..050b2c932 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2039,6 +2039,10 @@ static boolean S_SkipIntroMusic(void) if (!cv_skipintromusic.value) return false; + // dont skip if we disabled music, weird? but this would skip sounds that play on map start as well otherwise + if (music_disabled) + return false; + // check if menu music is playing, otherwise it may continue playing if (fasticmp(music.name, "titles")) return false; @@ -2050,6 +2054,11 @@ static boolean S_SkipIntroMusic(void) return false; } + // without sound there wont be any intro playing + if (sound_disabled) + return true; + // yes i sometimes play with only music but no sound + return true; }