projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21938b7
)
added not drawing or scanning laser if fuse is off in MM engine
author
Holger Schemel
<info@artsoft.org>
Thu, 12 Jan 2023 08:54:39 +0000
(09:54 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 12 Jan 2023 08:54:39 +0000
(09:54 +0100)
src/game_mm/mm_game.c
patch
|
blob
|
history
diff --git
a/src/game_mm/mm_game.c
b/src/game_mm/mm_game.c
index daec6fb77e4751ab8814235a3386658b75cb4bcd..571c9094240bd8b4a0019a50fcbc1ade8dc746c9 100644
(file)
--- a/
src/game_mm/mm_game.c
+++ b/
src/game_mm/mm_game.c
@@
-948,6
+948,10
@@
void ScanLaser(void)
if (game_mm.game_over)
return;
+ // do not scan laser if fuse is off
+ if (laser.fuse_off)
+ return;
+
DeactivateLaserTargetElement();
laser.overloaded = FALSE;
@@
-1325,6
+1329,10
@@
static void DrawLaserExt(int start_edge, int num_edges, int mode)
void DrawLaser(int start_edge, int mode)
{
+ // do not draw laser if fuse is off
+ if (laser.fuse_off && mode == DL_LASER_ENABLED)
+ return;
+
if (mode == DL_LASER_DISABLED)
DeactivateLaserTargetElement();