ESS-Import: fix handling of first person camera state (Bug #3416)

This commit is contained in:
scrawl 2016-06-02 16:25:23 +02:00
parent 373f991942
commit 2ce1da688f
2 changed files with 4 additions and 5 deletions

View file

@ -28,7 +28,7 @@ namespace ESSImport
if (pcdt.mPNAM.mDrawState & PCDT::DrawState_Spell)
out.mObject.mCreatureStats.mDrawState = 2;
firstPersonCam = (pcdt.mPNAM.mCameraState == PCDT::CameraState_FirstPerson);
firstPersonCam = !(pcdt.mPNAM.mCameraFlags & PCDT::CameraFlag_ThirdPerson);
for (std::vector<std::string>::const_iterator it = pcdt.mKnownDialogueTopics.begin();
it != pcdt.mKnownDialogueTopics.end(); ++it)

View file

@ -43,10 +43,9 @@ struct PCDT
DrawState_Weapon = 0x80,
DrawState_Spell = 0x100
};
enum CameraState
enum CameraFlags
{
CameraState_FirstPerson = 0x8,
CameraState_ThirdPerson = 0xa
CameraFlag_ThirdPerson = 0x2
};
#pragma pack(push)
@ -64,7 +63,7 @@ struct PCDT
struct PNAM
{
short mDrawState; // DrawState
short mCameraState; // CameraState
short mCameraFlags; // CameraFlags
unsigned int mLevelProgress;
float mSkillProgress[27]; // skill progress, non-uniform scaled
unsigned char mSkillIncreases[8]; // number of skill increases for each attribute