Glasses Asset: Difference between revisions

From COD Engine Research
No edit summary
No edit summary
Line 7: Line 7:
struct GlassDef
struct GlassDef
{
{
       char * unknownString1;
       const char * name;
       float maxHeatlh;
       float maxHeatlh;
       float thickness;
       float thickness;
Line 42: Line 42:
   unsigned int glassCount;
   unsigned int glassCount;
   Glass * glasses;
   Glass * glasses;
       char * unknown1; //Size = unknownCount1;
       char * common; //Size = totalSize;
       unsigned int unknownCount1;
       unsigned int totalSize;
       char unknown2[0x24];
       int smallAllocatorBlocks;
      int groups;
      int shards;
      int physics;
      int shardMemory;
      int freeCmd;
      int slots;
      int verts;
      int unknown; // is set to (verts * 2) & 0xFFFFFFF0
};
};
</syntaxhighlight>
</syntaxhighlight>

Revision as of 10:09, 12 February 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 an equivalent glass_map asset.

struct GlassDef
{
       const char * name;
       float maxHeatlh;
       float thickness;
       float minShardSize;
       float maxShardSize;
       float shardLifeProbability;
       float maxShards;
       Material * baseMaterial;
       Material * crackedMaterial;
       Material * shardMaterial;
       const char * crackSound;
       const char * shatterSound;
       const char * autoShatterSound;
       FxEffectDef * crackEffect;
       FxEffectDef * shatterEffect;
};

struct Glass
{
  GlassDef * glassDef;
#ifdef BO1
       char unknown1[0x39];
#elif BO2
       char unknown1[0x49];
#endif
  byte outlineVecCount;
  vec2_t * outline; 
       char unknown2[0x38];
};

struct Glasses
{
  const char * name;
  unsigned int glassCount;
  Glass * glasses;
       char * common; //Size = totalSize;
       unsigned int totalSize;
       int smallAllocatorBlocks;
       int groups;
       int shards;
       int physics;
       int shardMemory;
       int freeCmd;
       int slots;
       int verts;
       int unknown; // is set to (verts * 2) & 0xFFFFFFF0
};