Glasses Asset: Difference between revisions
Aerosoul94 (talk | contribs) No edit summary |
No edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
[[Category:BO1]] | [[Category:BO1]] | ||
[[Category:BO2]] | [[Category:BO2]] | ||
The glasses asset defines how different types of glasses around the map break, and the effects associated with that. It only exists on Black Ops 1 and 2 and changed very little. Modern Warfare 3 and Ghosts have | The glasses asset defines how different types of glasses around the map break, and the effects associated with that. It only exists on Black Ops 1 and 2 and changed very little. Modern Warfare 3 and Ghosts have a similar glass_map asset. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
struct GlassDef | struct GlassDef | ||
{ | { | ||
const char *name; | |||
int maxHealth; | |||
float thickness; | |||
float minShardSize; | |||
float maxShardSize; | |||
float shardLifeProbablility; | |||
int maxShards; | |||
Material *pristineMaterial; | |||
Material *crackedMaterial; | |||
Material *shardMaterial; | |||
const char *crackSound; | |||
const char *shatterShound; | |||
const char *autoShatterShound; | |||
FxEffectDef *crackEffect; | |||
FxEffectDef *shatterEffect; | |||
}; | }; | ||
struct Glass | struct Glass | ||
{ | { | ||
#ifdef BO2 | |||
unsigned int numCellIndices; | |||
unsigned __int16 cellIndices[6]; | |||
#endif | |||
GlassDef * glassDef; | GlassDef * glassDef; | ||
unsigned int index; | |||
unsigned int brushModel; | |||
vec3_t origin; | |||
vec3_t angles; | |||
vec3_t absmin; | |||
vec3_t absmax; | |||
bool isPlanar; | |||
byte outlineVecCount; | byte outlineVecCount; | ||
char binormalSign; | |||
vec2_t * outline; | vec2_t * outline; | ||
vec3_t outlineAxis[3]; | |||
vec3_t outlineOrigin; | |||
float uvScale; | |||
float thickness; | |||
}; | }; | ||
| Line 40: | Line 50: | ||
{ | { | ||
const char * name; | const char * name; | ||
unsigned int | unsigned int numGlasses; | ||
Glass *glasses; | |||
char *workMemory; | |||
unsigned int workMemorySize; | |||
unsigned int smallAllocatorBlocks; | |||
unsigned int maxGroups; | |||
unsigned int maxShards; | |||
unsigned int maxPhysics; | |||
unsigned int shardMemorySize; | |||
unsigned int maxFreeCmd; | |||
unsigned int numSlots; | |||
unsigned int numVerts; | |||
unsigned int numIndices; // is set to (numVerts * 2) & 0xFFFFFFF0 | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 01:19, 21 December 2014
The glasses asset defines how different types of glasses around the map break, and the effects associated with that. It only exists on Black Ops 1 and 2 and changed very little. Modern Warfare 3 and Ghosts have a similar glass_map asset.
struct GlassDef
{
const char *name;
int maxHealth;
float thickness;
float minShardSize;
float maxShardSize;
float shardLifeProbablility;
int maxShards;
Material *pristineMaterial;
Material *crackedMaterial;
Material *shardMaterial;
const char *crackSound;
const char *shatterShound;
const char *autoShatterShound;
FxEffectDef *crackEffect;
FxEffectDef *shatterEffect;
};
struct Glass
{
#ifdef BO2
unsigned int numCellIndices;
unsigned __int16 cellIndices[6];
#endif
GlassDef * glassDef;
unsigned int index;
unsigned int brushModel;
vec3_t origin;
vec3_t angles;
vec3_t absmin;
vec3_t absmax;
bool isPlanar;
byte outlineVecCount;
char binormalSign;
vec2_t * outline;
vec3_t outlineAxis[3];
vec3_t outlineOrigin;
float uvScale;
float thickness;
};
struct Glasses
{
const char * name;
unsigned int numGlasses;
Glass *glasses;
char *workMemory;
unsigned int workMemorySize;
unsigned int smallAllocatorBlocks;
unsigned int maxGroups;
unsigned int maxShards;
unsigned int maxPhysics;
unsigned int shardMemorySize;
unsigned int maxFreeCmd;
unsigned int numSlots;
unsigned int numVerts;
unsigned int numIndices; // is set to (numVerts * 2) & 0xFFFFFFF0
};