- Exhumed: Fix ramses/spirit head issues in DoSpiritHead() and clamp horizon in draw code in case for whatever reason (like before) we exceed the game's defined bounds.

This commit is contained in:
Mitchell Richters 2020-09-24 08:11:56 +10:00
parent 44fc452747
commit ca2f1bb556
2 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "aistuff.h"
#include "player.h"
#include "mapinfo.h"
#include "ps_input.h"
BEGIN_PS_NS
@ -209,7 +210,7 @@ void DoSpiritHead()
{
static short dimSectCount = 0;
PlayerList[0].q16horiz += PlayerList[0].q16horiz / 4;
sPlayerInput[0].actions |= SB_CENTERVIEW;
TileFiles.InvalidateTile(kTileRamsesWorkTile);
int totalclock = leveltime * 4;

View file

@ -348,6 +348,8 @@ void DrawView(double smoothRatio, bool sceneonly)
viewz = playerZ;
}
pan = clamp(pan, gi->playerHorizMin(), gi->playerHorizMax());
nCamerax = playerX;
nCameray = playerY;
nCameraz = playerZ;