X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=e159b96ef2183c7d6c73aed8c0f709872fefe5d6;hb=727d3b5fc7cac6f59652eaa23f1ed9e991ae50bd;hp=a3ad6f14842b48d363b52286776b2ffa97ffd748;hpb=7b3991f74b0e0dc6774453a59e674696560c2d93;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index a3ad6f14..e159b96e 100644 --- a/src/game.c +++ b/src/game.c @@ -2702,6 +2702,9 @@ static void InitGameEngine() game_em.use_single_button = (game.engine_version > VERSION_IDENT(4,0,0,2)); + game_em.use_snap_key_bug = + (game.engine_version < VERSION_IDENT(4,0,1,0)); + /* ---------------------------------------------------------------------- */ /* set maximal allowed number of custom element changes per game frame */ @@ -4596,6 +4599,10 @@ void InitPlayerGfxAnimation(struct PlayerInfo *player, int action, int dir) static void ResetGfxFrame(int x, int y) { + // profiling showed that "autotest" spends 10~20% of its time in this function + if (DrawingDeactivatedField()) + return; + int element = Feld[x][y]; int graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]);