metaforce/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp

94 lines
2.9 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2015-09-10 20:30:35 +00:00
#include "../../DNACommon/DNACommon.hpp"
#include "IScriptObject.hpp"
#include "Parameters.hpp"
2018-12-08 05:30:43 +00:00
namespace DataSpec::DNAMP1 {
struct SpacePirate : IScriptObject {
2019-08-11 00:49:41 +00:00
AT_DECL_DNA_YAMLV
2018-12-08 05:30:43 +00:00
String<-1> name;
Value<atVec3f> location;
Value<atVec3f> orientation;
Value<atVec3f> scale;
PatternedInfo patternedInfo;
ActorParameters actorParameters;
2018-12-13 07:39:16 +00:00
Value<float> AggressionCheck;
Value<float> CoverCheck;
Value<float> SearchRadius;
Value<float> FallBackCheck;
Value<float> FallBackRadius;
Value<float> HearingRadius;
/*
* 0x1: pendingAmbush
* 0x2: ceilingAmbush
* 0x4: nonAggressive
* 0x8: melee
* 0x10: noShuffleCloseCheck
* 0x20: onlyAttackInRange
* 0x40: unk
* 0x80: noKnockbackImpulseReset
* 0x200: noMeleeAttack
* 0x400: breakAttack
* 0x1000: seated
* 0x2000: shadowPirate
* 0x4000: alertBeforeCloak
* 0x8000: noBreakDodge
* 0x10000: floatingCorpse
* 0x20000: ragdollNoAiCollision
* 0x40000: trooper
*/
Value<atUint32> flags;
2018-12-08 05:30:43 +00:00
Value<bool> unknown8;
2018-12-13 07:39:16 +00:00
UniqueID32 Projectile;
DamageInfo ProjectileDamage;
Value<atUint32> Sound_Projectile;
DamageInfo BladeDamage;
Value<float> KneelAttackChance;
UniqueID32 KneelAttackShot;
DamageInfo KneelAttackDamage;
Value<float> DodgeCheck;
Value<atUint32> Sound_Impact;
Value<float> averageNextShotTime;
Value<float> nextShotTimeVariation;
Value<atUint32> Sound_Alert;
Value<float> GunTrackDelay;
Value<atUint32> firstBurstCount;
Value<float> CloakOpacity;
Value<float> MaxCloakOpacity;
Value<float> dodgeDelayTimeMin;
Value<float> dodgeDelayTimeMax;
Value<atUint32> Sound_Hurled;
Value<atUint32> Sound_Death;
2018-12-08 05:30:43 +00:00
Value<float> unknown19;
2018-12-13 07:39:16 +00:00
Value<float> AvoidDistance;
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const override {
2018-12-08 05:30:43 +00:00
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const override {
2019-07-20 04:27:21 +00:00
if (Projectile.isValid()) {
2018-12-13 07:39:16 +00:00
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(Projectile);
ent->name = name + "_Projectile";
}
2019-07-20 04:27:21 +00:00
if (KneelAttackShot.isValid()) {
2018-12-13 07:39:16 +00:00
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(KneelAttackShot);
ent->name = name + "_KneelAttackShot";
2016-10-02 22:41:36 +00:00
}
2018-12-08 05:30:43 +00:00
patternedInfo.nameIDs(pakRouter, name + "_patterned");
actorParameters.nameIDs(pakRouter, name + "_actp");
}
2016-10-02 22:41:36 +00:00
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
std::vector<hecl::ProjectPath>& lazyOut) const override {
2018-12-13 07:39:16 +00:00
g_curSpec->flattenDependencies(Projectile, pathsOut);
g_curSpec->flattenDependencies(KneelAttackShot, pathsOut);
2018-12-08 05:30:43 +00:00
patternedInfo.depIDs(pathsOut);
actorParameters.depIDs(pathsOut, lazyOut);
}
2015-09-10 20:30:35 +00:00
void gatherScans(std::vector<Scan>& scansOut) const override { actorParameters.scanIDs(scansOut); }
2018-12-08 05:30:43 +00:00
};
} // namespace DataSpec::DNAMP1