X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=e159b96ef2183c7d6c73aed8c0f709872fefe5d6;hb=727d3b5f;hp=b8d863fe232597b2b32f3c43132b2d10c6255980;hpb=e6b3efaee4f084e66f2fa709402f25fc67536952;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index b8d863fe..e159b96e 100644 --- a/src/game.c +++ b/src/game.c @@ -4599,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]);