DestructibleDef Asset: Difference between revisions

From COD Engine Research
No edit summary
No edit summary
Line 1: Line 1:
[[Category:Assets]]
[[Category:WaW]]
[[Category:BO1]]
[[Category:BO2]]
<source lang="cpp">
<source lang="cpp">
/* DestructiblePieceDef->flags */
/* DestructiblePieceDef->flags */
Line 8: Line 12:
struct DestructiblePieceDef
struct DestructiblePieceDef
{
{
#ifndef WAW
ScriptString showBone;
ScriptString showBone;
#else
XModel *model;
#endif
float breakHealth;
float breakHealth;
#ifndef WAW
float maxTime;
float maxTime;
#endif
int flags;
int flags;
FxEffectDef *breakEffect;
FxEffectDef *breakEffect;
Line 17: Line 27:
const char *loopSound;
const char *loopSound;
XModel *spawnModel[3];
XModel *spawnModel[3];
#ifndef WAW
PhysPreset *physPreset;
PhysPreset *physPreset;
#endif
};
};


struct DestructiblePiece // 0x138
struct DestructiblePiece
{
{
DestructiblePieceDef stages[5];
DestructiblePieceDef stages[5];
int parentPiece;
#ifndef WAW
char parentPiece;
#else
short pieceAttachBone;
short parentPiece;
#endif
float parentDamage;
float parentDamage;
float bulletDamageScale;
float bulletDamageScale;
float explosiveDamageScale;
float explosiveDamageScale;
#ifndef WAW
float meleeDamageScale;
float meleeDamageScale;
float impactDamageScale;
float impactDamageScale;
#endif
int damageEntity;
int damageEntity;
PhysConstraints *physConstraint;
PhysConstraints *physConstraint;
Line 36: Line 55:
const char * burnSound;
const char * burnSound;
ScriptString pieceLabel;
ScriptString pieceLabel;
#ifndef WAW
int unknown[5];
int unknown[5];
#endif
};
};


struct DestructibleDef // 0x18
struct DestructibleDef
{
{
const char *name;
const char *name;
#ifndef WAW
XModel *model;
XModel *model;
#endif
XModel *pristineModel;
XModel *pristineModel;
unsigned int numPieces;
unsigned int numPieces;

Revision as of 10:41, 11 February 2014

/* 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;
};