mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 07:45:34 +00:00
fix creatures has spells, creatures ai data
This commit is contained in:
parent
02d7aa4135
commit
75fa0288a3
3 changed files with 5 additions and 14 deletions
|
@ -93,7 +93,6 @@ namespace ESM
|
|||
AIPackage pack;
|
||||
|
||||
esm.getSubName();
|
||||
std::cout << esm.retSubName().toString() << std::endl;
|
||||
if (esm.retSubName() == 0x54444e43) { // CNDT
|
||||
list.back().cellName = esm.getHString();
|
||||
} else if (esm.retSubName() == AI_Wander) {
|
||||
|
|
|
@ -18,6 +18,7 @@ void Creature::load(ESMReader &esm, const std::string& id)
|
|||
esm.getHNOT(scale, "XSCL");
|
||||
|
||||
inventory.load(esm);
|
||||
spells.load(esm);
|
||||
|
||||
if (esm.isNextSub("AIDT"))
|
||||
{
|
||||
|
@ -27,20 +28,8 @@ void Creature::load(ESMReader &esm, const std::string& id)
|
|||
else
|
||||
hasAI = false;
|
||||
|
||||
// More subrecords:
|
||||
// AI_W - wander (14 bytes, i don't understand it)
|
||||
// short distance
|
||||
// byte duration
|
||||
// byte timeOfDay
|
||||
// byte idle[10]
|
||||
//
|
||||
// Rest is optional:
|
||||
// AI_T - travel?
|
||||
// AI_F - follow?
|
||||
// AI_E - escort?
|
||||
// AI_A - activate?
|
||||
aiPack.load(esm);
|
||||
esm.skipRecord();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "esm_reader.hpp"
|
||||
#include "loadcont.hpp"
|
||||
#include "defs.hpp"
|
||||
#include "defs_ai.hpp"
|
||||
|
||||
namespace ESM
|
||||
|
@ -61,9 +62,11 @@ struct Creature
|
|||
|
||||
// Defined in loadcont.hpp
|
||||
InventoryList inventory;
|
||||
SpellList spells;
|
||||
|
||||
bool hasAI;
|
||||
AIDTstruct AI;
|
||||
AIPackageList aiPack;
|
||||
|
||||
std::string mId;
|
||||
|
||||
|
|
Loading…
Reference in a new issue