mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +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;
|
AIPackage pack;
|
||||||
|
|
||||||
esm.getSubName();
|
esm.getSubName();
|
||||||
std::cout << esm.retSubName().toString() << std::endl;
|
|
||||||
if (esm.retSubName() == 0x54444e43) { // CNDT
|
if (esm.retSubName() == 0x54444e43) { // CNDT
|
||||||
list.back().cellName = esm.getHString();
|
list.back().cellName = esm.getHString();
|
||||||
} else if (esm.retSubName() == AI_Wander) {
|
} else if (esm.retSubName() == AI_Wander) {
|
||||||
|
|
|
@ -18,6 +18,7 @@ void Creature::load(ESMReader &esm, const std::string& id)
|
||||||
esm.getHNOT(scale, "XSCL");
|
esm.getHNOT(scale, "XSCL");
|
||||||
|
|
||||||
inventory.load(esm);
|
inventory.load(esm);
|
||||||
|
spells.load(esm);
|
||||||
|
|
||||||
if (esm.isNextSub("AIDT"))
|
if (esm.isNextSub("AIDT"))
|
||||||
{
|
{
|
||||||
|
@ -27,20 +28,8 @@ void Creature::load(ESMReader &esm, const std::string& id)
|
||||||
else
|
else
|
||||||
hasAI = false;
|
hasAI = false;
|
||||||
|
|
||||||
// More subrecords:
|
aiPack.load(esm);
|
||||||
// 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?
|
|
||||||
esm.skipRecord();
|
esm.skipRecord();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "esm_reader.hpp"
|
#include "esm_reader.hpp"
|
||||||
#include "loadcont.hpp"
|
#include "loadcont.hpp"
|
||||||
|
#include "defs.hpp"
|
||||||
#include "defs_ai.hpp"
|
#include "defs_ai.hpp"
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
|
@ -61,9 +62,11 @@ struct Creature
|
||||||
|
|
||||||
// Defined in loadcont.hpp
|
// Defined in loadcont.hpp
|
||||||
InventoryList inventory;
|
InventoryList inventory;
|
||||||
|
SpellList spells;
|
||||||
|
|
||||||
bool hasAI;
|
bool hasAI;
|
||||||
AIDTstruct AI;
|
AIDTstruct AI;
|
||||||
|
AIPackageList aiPack;
|
||||||
|
|
||||||
std::string mId;
|
std::string mId;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue