projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added element properties for BD engine
[rocksndiamonds.git]
/
src
/
game_em
/
logic.c
diff --git
a/src/game_em/logic.c
b/src/game_em/logic.c
index 61f3237c98727d3faf59b09a032954befe854406..b73edab2558584e6bc2d53475c04dd9aa81383b5 100644
(file)
--- a/
src/game_em/logic.c
+++ b/
src/game_em/logic.c
@@
-777,6
+777,9
@@
static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
if (dy)
break;
if (dy)
break;
+ if (game_em.use_push_delay && RANDOM(32) < 16)
+ goto stone_push_anim;
+
switch (cave[x+dx][y])
{
case Xblank:
switch (cave[x+dx][y])
{
case Xblank:
@@
-817,6
+820,8
@@
static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
break;
}
break;
}
+ stone_push_anim:
+
ply->anim = PLY_push_n + anim;
break;
ply->anim = PLY_push_n + anim;
break;
@@
-824,6
+829,9
@@
static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
if (dy)
break;
if (dy)
break;
+ if (game_em.use_push_delay && RANDOM(32) < 22)
+ goto bomb_push_anim;
+
switch (cave[x+dx][y])
{
case Xblank:
switch (cave[x+dx][y])
{
case Xblank:
@@
-864,6
+872,8
@@
static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
break;
}
break;
}
+ bomb_push_anim:
+
ply->anim = PLY_push_n + anim;
break;
ply->anim = PLY_push_n + anim;
break;
@@
-871,6
+881,9
@@
static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
if (dy)
break;
if (dy)
break;
+ if (game_em.use_push_delay && RANDOM(32) < 19)
+ goto nut_push_anim;
+
switch (cave[x+dx][y])
{
case Xblank:
switch (cave[x+dx][y])
{
case Xblank:
@@
-911,6
+924,8
@@
static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
break;
}
break;
}
+ nut_push_anim:
+
ply->anim = PLY_push_n + anim;
break;
ply->anim = PLY_push_n + anim;
break;
@@
-1469,6
+1484,8
@@
static void check_player(struct PLAYER *ply)
ply->dynamite_cnt = 0; /* reset dynamite timer if we move */
ply->dynamite_cnt = 0; /* reset dynamite timer if we move */
+ seed = game_em.random;
+
if (!ply->joy_snap) /* player wants to move */
{
boolean moved = FALSE;
if (!ply->joy_snap) /* player wants to move */
{
boolean moved = FALSE;
@@
-1500,6
+1517,8
@@
static void check_player(struct PLAYER *ply)
{
game_em.any_player_snapping = player_digfield(ply, dx, dy);
}
{
game_em.any_player_snapping = player_digfield(ply, dx, dy);
}
+
+ game_em.random = seed;
}
static void set_nearest_player_xy(int x, int y, int *dx, int *dy)
}
static void set_nearest_player_xy(int x, int y, int *dx, int *dy)