projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with cutting through laser emitter in special cases in MM engine
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 351c36e43e820d421b7502cc08592265cb351c73..fbfb601af898908d12a8b5d1f2ee7ae255e7c5e5 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-4191,9
+4191,6
@@
static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage)
DrawDynamite(last_jx, last_jy);
else
DrawLevelField(last_jx, last_jy);
DrawDynamite(last_jx, last_jy);
else
DrawLevelField(last_jx, last_jy);
-
- if (player->is_pushing && IN_SCR_FIELD(SCREENX(next_jx), SCREENY(next_jy)))
- DrawLevelElement(next_jx, next_jy, EL_EMPTY);
}
else if (drawing_stage == DRAW_PLAYER_STAGE_FIELD_UNDER_PLAYER)
{
}
else if (drawing_stage == DRAW_PLAYER_STAGE_FIELD_UNDER_PLAYER)
{
@@
-4251,6
+4248,9
@@
static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage)
if (!player->is_pushing || !player->is_moving)
return;
if (!player->is_pushing || !player->is_moving)
return;
+ if (Tile[next_jx][next_jy] == EL_EXPLOSION)
+ return;
+
int gfx_frame = GfxFrame[jx][jy];
if (!IS_MOVING(jx, jy)) // push movement already finished
int gfx_frame = GfxFrame[jx][jy];
if (!IS_MOVING(jx, jy)) // push movement already finished
@@
-4272,14
+4272,12
@@
static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage)
DrawLevelElement(jx, jy, Back[jx][jy]);
else
DrawLevelElement(jx, jy, EL_EMPTY);
DrawLevelElement(jx, jy, Back[jx][jy]);
else
DrawLevelElement(jx, jy, EL_EMPTY);
-
- if (Back[next_jx][next_jy])
- DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);
- else
- DrawLevelElement(next_jx, next_jy, EL_EMPTY);
}
}
- else if (Back[next_jx][next_jy])
+
+ if (Back[next_jx][next_jy])
DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);
DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);
+ else
+ DrawLevelElement(next_jx, next_jy, EL_EMPTY);
int px = SCREENX(jx), py = SCREENY(jy);
int pxx = (TILEX - ABS(sxx)) * dx;
int px = SCREENX(jx), py = SCREENY(jy);
int pxx = (TILEX - ABS(sxx)) * dx;
@@
-5896,7
+5894,8
@@
void CreateToolButtons(void)
}
}
}
}
- if (id >= TOOL_CTRL_ID_PLAYER_1 && id <= TOOL_CTRL_ID_PLAYER_4)
+ if (id >= TOOL_CTRL_ID_PLAYER_1 && id <= TOOL_CTRL_ID_PLAYER_4 &&
+ pos->draw_player)
{
int player_nr = id - TOOL_CTRL_ID_PLAYER_1;
{
int player_nr = id - TOOL_CTRL_ID_PLAYER_1;