DestructibleDef Asset: Difference between revisions
Aerosoul94 (talk | contribs) No edit summary |
No edit summary |
||
| (One intermediate revision 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 | struct DestructibleStage | ||
{ | { | ||
#ifndef WAW | |||
float breakHealth; | 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 | 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 meleeDamageScale; | ||
float impactDamageScale; | 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 | struct DestructibleDef | ||
{ | { | ||
const char *name; | |||
#ifndef WAW | |||
XModel *model; | XModel *model; | ||
#endif | |||
XModel *pristineModel; | |||
unsigned int numPieces; | |||
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;
};