From: Holger Schemel Date: Mon, 2 Jan 2023 09:52:48 +0000 (+0100) Subject: fixed drawing overloaded laser when rotating McDuffin in MM engine X-Git-Tag: 4.3.5.0~61 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ad461d08bdfcc72774b067c7cb9fc7d6a034306f;p=rocksndiamonds.git fixed drawing overloaded laser when rotating McDuffin in MM engine --- diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 9d32be5e..b4fef962 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -573,10 +573,13 @@ static void InitLaser(void) AddLaserEdge(LX, LY); // set laser starting edge + int color_up = 0xFF * laser.overload_value / MAX_LASER_OVERLOAD; + int color_down = 0xFF - color_up; + pen_ray = GetPixelFromRGB(window, - native_mm_level.laser_red * 0xFF, - native_mm_level.laser_green * 0xFF, - native_mm_level.laser_blue * 0xFF); + (native_mm_level.laser_red ? 0xFF : color_up), + (native_mm_level.laser_green ? color_down : 0x00), + (native_mm_level.laser_blue ? color_down : 0x00)); } void InitGameEngine_MM(void)