projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20030807-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index a9256de700b26165492684b984d700a492895e22..f5b3ab7b883d783c088bd11a20379611c4fc3a75 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1032,6
+1032,7
@@
void InitGame()
game.switchgate_pos = 0;
game.balloon_dir = MV_NO_MOVING;
game.explosions_delayed = TRUE;
game.switchgate_pos = 0;
game.balloon_dir = MV_NO_MOVING;
game.explosions_delayed = TRUE;
+ game.current_gravity = level.initial_gravity;
for (i=0; i<4; i++)
{
for (i=0; i<4; i++)
{
@@
-6087,7
+6088,7
@@
void ScrollLevel(int dx, int dy)
static void CheckGravityMovement(struct PlayerInfo *player)
{
static void CheckGravityMovement(struct PlayerInfo *player)
{
- if (
level.
gravity && !player->programmed_action)
+ if (
game.current_
gravity && !player->programmed_action)
{
int move_dir_vertical = player->action & (MV_UP | MV_DOWN);
int move_dir_horizontal = player->action & (MV_LEFT | MV_RIGHT);
{
int move_dir_vertical = player->action & (MV_UP | MV_DOWN);
int move_dir_horizontal = player->action & (MV_LEFT | MV_RIGHT);
@@
-7085,7
+7086,7
@@
int DigField(struct PlayerInfo *player,
element == EL_SP_GRAVITY_PORT_RIGHT ||
element == EL_SP_GRAVITY_PORT_UP ||
element == EL_SP_GRAVITY_PORT_DOWN)
element == EL_SP_GRAVITY_PORT_RIGHT ||
element == EL_SP_GRAVITY_PORT_UP ||
element == EL_SP_GRAVITY_PORT_DOWN)
-
level.gravity = !level.
gravity;
+
game.current_gravity = !game.current_
gravity;
/* automatically move to the next field with double speed */
player->programmed_action = move_direction;
/* automatically move to the next field with double speed */
player->programmed_action = move_direction;