mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 00:32:49 +00:00
some physics stuff idk
This commit is contained in:
parent
6de9b49d3d
commit
6e5b45453d
@ -29,4 +29,26 @@ namespace Nif
|
||||
shape.post(nif);
|
||||
}
|
||||
|
||||
void bhkEntity::read(NIFStream *nif)
|
||||
{
|
||||
bhkWorldObject::read(nif);
|
||||
responseType = static_cast<hkResponseType>(nif->getChar());
|
||||
nif->skip(1); // Unused
|
||||
processContactDelay = nif->getUShort();
|
||||
}
|
||||
|
||||
void HavokMaterial::read(NIFStream *nif)
|
||||
{
|
||||
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD)
|
||||
nif->skip(4); // Unknown
|
||||
material = nif->getUInt();
|
||||
}
|
||||
|
||||
void hkSubPartData::read(NIFStream *nif)
|
||||
{
|
||||
havokFilter = nif->getUInt();
|
||||
numVertices = nif->getUInt();
|
||||
material.read(nif);
|
||||
}
|
||||
|
||||
} // Namespace
|
@ -57,5 +57,33 @@ struct bhkWorldObject : public Record
|
||||
|
||||
struct bhkShape : public Record {};
|
||||
|
||||
enum class hkResponseType : uint8_t
|
||||
{
|
||||
Invalid = 0,
|
||||
SimpleContact = 1,
|
||||
Reporting = 2,
|
||||
None = 3
|
||||
};
|
||||
|
||||
struct bhkEntity : public bhkWorldObject
|
||||
{
|
||||
hkResponseType responseType;
|
||||
unsigned short processContactDelay;
|
||||
void read(NIFStream *nif) override;
|
||||
};
|
||||
|
||||
struct HavokMaterial
|
||||
{
|
||||
unsigned int material;
|
||||
void read(NIFStream *nif);
|
||||
};
|
||||
|
||||
struct hkSubPartData
|
||||
{
|
||||
HavokMaterial material;
|
||||
unsigned int numVertices, havokFilter;
|
||||
void read(NIFStream *nif);
|
||||
};
|
||||
|
||||
} // Namespace
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user