projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0628b5c
)
moved code to deactivate target element to separate function in MM engine
author
Holger Schemel
<info@artsoft.org>
Thu, 12 Jan 2023 08:46:12 +0000
(09:46 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 12 Jan 2023 08:46:12 +0000
(09:46 +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 0a3effcadd8daa8c53353ad44da3b2817823e744..c9712c9b2639521de4f612d63795cd249aaefc3a 100644
(file)
--- a/
src/game_mm/mm_game.c
+++ b/
src/game_mm/mm_game.c
@@
-916,15
+916,8
@@
static int ScanPixel(void)
return hit_mask;
}
return hit_mask;
}
-
void ScanLaser
(void)
+
static void DeactivateLaserTargetElement
(void)
{
{
- int element;
- int end = 0, rf = laser.num_edges;
-
- // do not scan laser again after the game was lost for whatever reason
- if (game_mm.game_over)
- return;
-
if (laser.dest_element_last == EL_BOMB_ACTIVE ||
laser.dest_element_last == EL_MINE_ACTIVE ||
laser.dest_element_last == EL_GRAY_BALL_OPENING)
if (laser.dest_element_last == EL_BOMB_ACTIVE ||
laser.dest_element_last == EL_MINE_ACTIVE ||
laser.dest_element_last == EL_GRAY_BALL_OPENING)
@@
-944,6
+937,18
@@
void ScanLaser(void)
laser.dest_element_last_x = -1;
laser.dest_element_last_y = -1;
}
laser.dest_element_last_x = -1;
laser.dest_element_last_y = -1;
}
+}
+
+void ScanLaser(void)
+{
+ int element;
+ int end = 0, rf = laser.num_edges;
+
+ // do not scan laser again after the game was lost for whatever reason
+ if (game_mm.game_over)
+ return;
+
+ DeactivateLaserTargetElement();
laser.overloaded = FALSE;
laser.stops_inside_element = FALSE;
laser.overloaded = FALSE;
laser.stops_inside_element = FALSE;