summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6eaf8f1)
This change fixes problems with emulating the behaviour of initially
pushed objects for old tapes. (With the new EM game engine, objects
that are pushed towards the player when initially created always kill
the player, while the object just stopped with the old engine.)
This is an addition to commit
1dd2190d.
game_em.use_old_android =
(game.engine_version < VERSION_IDENT(4,1,4,2));
game_em.use_old_android =
(game.engine_version < VERSION_IDENT(4,1,4,2));
+ game_em.use_old_push_elements =
+ (game.engine_version < VERSION_IDENT(4,1,4,2));
+
game_em.use_wrap_around =
(game.engine_version > VERSION_IDENT(4,1,4,1));
game_em.use_wrap_around =
(game.engine_version > VERSION_IDENT(4,1,4,1));
// - game_em.use_snap_key_bug (default: FALSE)
// - game_em.use_old_explosions (default: FALSE)
// - game_em.use_old_android (default: FALSE)
// - game_em.use_snap_key_bug (default: FALSE)
// - game_em.use_old_explosions (default: FALSE)
// - game_em.use_old_android (default: FALSE)
+ // - game_em.use_old_push_elements (default: FALSE)
// - game_em.use_wrap_around (default: TRUE)
game_em.level_solved = FALSE;
// - game_em.use_wrap_around (default: TRUE)
game_em.level_solved = FALSE;
boolean use_snap_key_bug;
boolean use_old_explosions;
boolean use_old_android;
boolean use_snap_key_bug;
boolean use_old_explosions;
boolean use_old_android;
+ boolean use_old_push_elements;
boolean use_wrap_around;
};
boolean use_wrap_around;
};
+static void Lpush_element_old(int x, int y, int element)
+{
+ if (!game_em.use_old_push_elements)
+ return;
+
+ cave[x][y] = element;
+ next[x][y] = element;
+}
+
static boolean player_killed(struct PLAYER *ply)
{
int x = ply->x;
static boolean player_killed(struct PLAYER *ply)
{
int x = ply->x;
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xemerald);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xemerald);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xdiamond);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xdiamond);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xstone);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xstone);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xbomb);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xbomb);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xnut);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xnut);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xspring);
+ case Zplayer:
+ if (!game_em.use_old_push_elements)
+ break;
case Zborder:
case Zbug:
case Ztank:
case Zborder:
case Zbug:
case Ztank:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
case Xboom_tank:
case Xboom_android:
case Xboom_1:
+ Lpush_element_old(x, y, Xspring);