DestructibleDef Asset: Difference between revisions

From COD Engine Research
Created page with "<source lang="cpp"> →‎DestructiblePieceDef->flags: #define EXPLOSIVEDAMAGEONLY 1 #define PARENTDAMAGE 2 #define PHYSICSPARENT 4 #define MELEEDAMAGE 8 struct Destructibl..."
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Assets]]
[[Category:WaW]]
[[Category:BO1]]
[[Category:BO2]]
<source lang="cpp">
<source lang="cpp">
/* DestructiblePieceDef->flags */
/* DestructiblePieceDef->flags */
Line 6: Line 10:
#define MELEEDAMAGE 8
#define MELEEDAMAGE 8


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


struct DestructiblePiece // 0x138
struct DestructiblePiece
{
{
DestructiblePieceDef stages[5];
  DestructibleStage stages[5];
char parentPiece;
#ifndef WAW
char unknownData1[0x1B];
  char parentPiece;
PhysConstraints * constraints;
#else
int unknownInt1;
short pieceAttachBone;
char * unknownString1;
short parentPiece;
FxEffectDef *effectDef;
#endif
char * unknownString2;
  float parentDamagePercent;
ScriptString scriptString1;
  float bulletDamageScale;
short unkShort1;
  float explosiveDamageScale;
char unknownData2[0x14];
#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 // 0x18
struct DestructibleDef
{
{
const char *name;
  const char *name;
#ifndef WAW
XModel *model;
XModel *model;
XModel *pristineModel;
#endif
unsigned int numPieces;
  XModel *pristineModel;
DestructiblePiece *pieces; // count = numPieces
  unsigned int numPieces;
int clientOnly;
  DestructiblePiece *pieces;
  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;
};