From ac30864551850b35c31d5af3d8624a84717b5db1 Mon Sep 17 00:00:00 2001 From: DenisBelmondo Date: Fri, 20 Dec 2024 02:15:41 -0700 Subject: [PATCH] Update mugshot frame formula to be closer to vanilla Wolf3d. --- js/game.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/game.js b/js/game.js index 56487c7..905ee4e 100644 --- a/js/game.js +++ b/js/game.js @@ -481,7 +481,8 @@ Wolf.Game = (function() { player.faceGotGun = player.faceOuch = false; player.faceFrame = Wolf.Random.rnd() >> 6; if( player.faceFrame == 3) { - player.faceFrame = 0; + // DenisBelmondo@github: mugshot-fix + player.faceFrame = 1; } player.faceCount = 0; } @@ -497,7 +498,9 @@ Wolf.Game = (function() { if (h < 0) { h = 0; } - pic = (3*((100-h)/16)>>0) + player.faceFrame; + + // DenisBelmondo@github: mugshot-fix + pic = (3*(((100-h)/16)|0)|0) + player.faceFrame; //gsh if ((player.flags & Wolf.FL_GODMODE)) {