From 2ce1da688f71b0a07fc3385b606fc1872d3745f6 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 2 Jun 2016 16:25:23 +0200 Subject: [PATCH] ESS-Import: fix handling of first person camera state (Bug #3416) --- apps/essimporter/convertplayer.cpp | 2 +- apps/essimporter/importplayer.hpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/essimporter/convertplayer.cpp b/apps/essimporter/convertplayer.cpp index 5718201f7..00a2a10f5 100644 --- a/apps/essimporter/convertplayer.cpp +++ b/apps/essimporter/convertplayer.cpp @@ -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::const_iterator it = pcdt.mKnownDialogueTopics.begin(); it != pcdt.mKnownDialogueTopics.end(); ++it) diff --git a/apps/essimporter/importplayer.hpp b/apps/essimporter/importplayer.hpp index bc6b94be2..3e537cc16 100644 --- a/apps/essimporter/importplayer.hpp +++ b/apps/essimporter/importplayer.hpp @@ -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