DestructibleDef Asset: Difference between revisions

From COD Engine Research
No edit summary
No edit summary
 
Line 10: Line 10:
#define MELEEDAMAGE 8
#define MELEEDAMAGE 8


struct DestructiblePieceDef
struct DestructibleStage
{
{
#ifndef WAW
#ifndef WAW
ScriptString showBone;
  ScriptString showBone;
#else
#else
XModel *model;
XModel *model;
#endif
#endif
float breakHealth;
  float breakHealth;
#ifndef WAW
#ifndef WAW
float maxTime;
  float maxTime;
#endif
#endif
int flags;
  unsigned int flags;
FxEffectDef *breakEffect;
  FxEffectDef *breakEffect;
const char *breakSound;
  const char *breakSound;
const char *breakNotify;
  const char *breakNotify;
const char *loopSound;
  const char *loopSound;
XModel *spawnModel[3];
  XModel *spawnModel[3];
#ifndef WAW
#ifndef WAW
PhysPreset *physPreset;
  PhysPreset *physPreset;
#endif
#endif
};
};
Line 34: Line 34:
struct DestructiblePiece
struct DestructiblePiece
{
{
DestructiblePieceDef stages[5];
  DestructibleStage stages[5];
#ifndef WAW
#ifndef WAW
char parentPiece;
  char parentPiece;
#else
#else
short pieceAttachBone;
short pieceAttachBone;
short parentPiece;
short parentPiece;
#endif
#endif
float parentDamage;
  float parentDamagePercent;
float bulletDamageScale;
  float bulletDamageScale;
float explosiveDamageScale;
  float explosiveDamageScale;
#ifndef WAW
#ifndef WAW
float meleeDamageScale;
float meleeDamageScale;
float impactDamageScale;
float impactDamageScale;
#endif
#endif
int damageEntity;
  float entityDamageTransfer;
PhysConstraints *physConstraint;
  PhysConstraints *physConstraints;
int pieceHealth;
  int health;
const char *damageSound;
  const char *damageSound;
FxEffectDef *burnEffect;
  FxEffectDef *burnEffect;
const char * burnSound;
  const char * burnSound;
ScriptString pieceLabel;
  ScriptString enableLabel;
#ifndef WAW
#ifndef WAW
int unknown[5];
  int hideBones[5];
#endif
#endif
};
};
Line 62: Line 62:
struct DestructibleDef
struct DestructibleDef
{
{
const char *name;
  const char *name;
#ifndef WAW
#ifndef WAW
XModel *model;
XModel *model;
#endif
#endif
XModel *pristineModel;
  XModel *pristineModel;
unsigned int numPieces;
  unsigned int numPieces;
DestructiblePiece *pieces; // count = numPieces
  DestructiblePiece *pieces;
int clientOnly;
  int clientOnly;
};
};
</source>
</source>

Latest revision as of 01:47, 21 December 2014

/* DestructiblePieceDef->flags */
#define EXPLOSIVEDAMAGEONLY	1
#define PARENTDAMAGE		2
#define PHYSICSPARENT		4
#define MELEEDAMAGE		8

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

struct DestructiblePiece
{
  DestructibleStage stages[5];
#ifndef WAW
  char parentPiece;
#else
	short pieceAttachBone;
	short parentPiece;
#endif
  float parentDamagePercent;
  float bulletDamageScale;
  float explosiveDamageScale;
#ifndef WAW
	float meleeDamageScale;
	float impactDamageScale;
#endif
  float entityDamageTransfer;
  PhysConstraints *physConstraints;
  int health;
  const char *damageSound;
  FxEffectDef *burnEffect;
  const char * burnSound;
  ScriptString enableLabel;
#ifndef WAW
  int hideBones[5];
#endif
};

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