DestructibleDef Asset

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

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

struct DestructiblePiece
{
	DestructiblePieceDef stages[5];
#ifndef WAW
	char parentPiece;
#else
	short pieceAttachBone;
	short parentPiece;
#endif
	float parentDamage;
	float bulletDamageScale;
	float explosiveDamageScale;
#ifndef WAW
	float meleeDamageScale;
	float impactDamageScale;
#endif
	int damageEntity;
	PhysConstraints *physConstraint;
	int pieceHealth;
	const char *damageSound;
	FxEffectDef *burnEffect;
	const char * burnSound;
	ScriptString pieceLabel;
#ifndef WAW
	int unknown[5];
#endif
};

struct DestructibleDef
{
	const char *name;
#ifndef WAW
	XModel *model;
#endif
	XModel *pristineModel;
	unsigned int numPieces;
	DestructiblePiece *pieces;	// count = numPieces
	int clientOnly;
};