DestructibleDef Asset

From COD Engine Research
Revision as of 10:05, 11 February 2014 by Aerosoul94 (talk | contribs)
/* DestructiblePieceDef->flags */
#define EXPLOSIVEDAMAGEONLY	1
#define PARENTDAMAGE		2
#define PHYSICSPARENT		4
#define MELEEDAMAGE		8

struct DestructiblePieceDef
{
	ScriptString showBone;
	float breakHealth;
	float maxTime;
	int flags;
	FxEffectDef *breakEffect;
	const char *breakSound;
	const char *breakNotify;
	const char *loopSound;
	XModel *spawnModel[3];
	PhysPreset *physPreset;
};

struct DestructiblePiece	// 0x138
{
	DestructiblePieceDef stages[5];
	int parentPiece;
	float parentDamage;
	float bulletDamageScale;
	float explosiveDamageScale;
	float meleeDamageScale;
	float impactDamageScale;
	int damageEntity;
	PhysConstraints *physConstraint;
	int pieceHealth;
	const char *damageSound;
	FxEffectDef *burnEffect;
	const char * burnSound;
	ScriptString pieceLabel;
	int unknown[5];
};

struct DestructibleDef	// 0x18
{
	const char *name;
	XModel *model;
	XModel *pristineModel;
	unsigned int numPieces;
	DestructiblePiece *pieces;	// count = numPieces
	int clientOnly;
};