mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 01:39:40 +00:00
essimporter: Recover player pitch from PCDT (bug #6818)
This commit is contained in:
parent
79cdc08253
commit
8f9b2becde
3 changed files with 12 additions and 1 deletions
|
@ -136,6 +136,7 @@
|
|||
Bug #6753: Info records without a DATA subrecords are loaded incorrectly
|
||||
Bug #6794: Light sources are attached to mesh bounds centers instead of mesh origins when AttachLight NiNode is missing
|
||||
Bug #6799: Game crashes if an NPC has no Class attached
|
||||
Bug #6818: ess-importer doesn't exactly reproduce camera
|
||||
Bug #6849: ImageButton texture is not scaled properly
|
||||
Bug #6869: Hits queue stagger during swing animation
|
||||
Bug #6895: Removing a negative number of items from a script, makes the script terminate with an error
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "convertplayer.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <components/misc/constants.hpp>
|
||||
#include <components/misc/stringops.hpp>
|
||||
|
||||
|
@ -8,6 +10,8 @@ namespace ESSImport
|
|||
|
||||
void convertPCDT(const PCDT& pcdt, ESM::Player& out, std::vector<std::string>& outDialogueTopics, bool& firstPersonCam, bool& teleportingEnabled, bool& levitationEnabled, ESM::ControlsState& controls)
|
||||
{
|
||||
out.mObject.mPosition.rot[0] = -atan2(pcdt.mPNAM.mVerticalRotation.mData[2][1], pcdt.mPNAM.mVerticalRotation.mData[2][2]);
|
||||
|
||||
out.mBirthsign = pcdt.mBirthsign;
|
||||
out.mObject.mNpcStats.mBounty = pcdt.mBounty;
|
||||
for (const auto & essFaction : pcdt.mFactions)
|
||||
|
|
|
@ -78,6 +78,11 @@ struct PCDT
|
|||
int mCellX, mCellY; // grid coordinates; for interior cells this is always (0, 0)
|
||||
};
|
||||
|
||||
struct Rotation
|
||||
{
|
||||
float mData[3][3];
|
||||
};
|
||||
|
||||
int mPlayerFlags; // controls, camera and draw state
|
||||
unsigned int mLevelProgress;
|
||||
float mSkillProgress[27]; // skill progress, non-uniform scaled
|
||||
|
@ -88,7 +93,8 @@ struct PCDT
|
|||
int mDetectEnchantmentMagnitude; // seems redundant
|
||||
int mDetectAnimalMagnitude; // seems redundant
|
||||
MarkLocation mMarkLocation;
|
||||
unsigned char mUnknown3[40];
|
||||
unsigned char mUnknown3[4];
|
||||
Rotation mVerticalRotation;
|
||||
unsigned char mSpecIncreases[3]; // number of skill increases for each specialization
|
||||
unsigned char mUnknown4;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue