CID-329
Checker: UNINIT_CTOR Function: LLMaterialInfo::LLMaterialInfo(unsigned char, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const LLUUID &) File: /indra/llprimitive/llmaterialtable.hmeow-7.2.2
parent
138c1fa86d
commit
f83ca2abd6
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
class LLMaterialInfo;
|
||||
|
||||
const U32 LLMATERIAL_INFO_NAME_LENGTH = 256;
|
||||
|
||||
// We've moved toward more reasonable mass values for the Havok4 engine.
|
||||
|
|
@ -64,45 +66,6 @@ const F32 LEGACY_DEFAULT_OBJECT_DENSITY = 10.0f;
|
|||
const F32 DEFAULT_AVATAR_DENSITY = 445.3f; // was 444.24f;
|
||||
|
||||
|
||||
class LLMaterialInfo
|
||||
{
|
||||
public:
|
||||
U8 mMCode;
|
||||
std::string mName;
|
||||
LLUUID mDefaultTextureID;
|
||||
LLUUID mShatterSoundID;
|
||||
F32 mDensity; // kg/m^3
|
||||
F32 mFriction;
|
||||
F32 mRestitution;
|
||||
|
||||
// damage and energy constants
|
||||
F32 mHPModifier; // modifier on mass based HP total
|
||||
F32 mDamageModifier; // modifier on KE based damage
|
||||
F32 mEPModifier; // modifier on mass based EP total
|
||||
|
||||
LLMaterialInfo(U8 mcode, const std::string& name, const LLUUID &uuid)
|
||||
{
|
||||
init(mcode,name,uuid);
|
||||
};
|
||||
|
||||
void init(U8 mcode, const std::string& name, const LLUUID &uuid)
|
||||
{
|
||||
mDensity = 1000.f; // default to 1000.0 (water)
|
||||
mHPModifier = 1.f;
|
||||
mDamageModifier = 1.f;
|
||||
mEPModifier = 1.f;
|
||||
|
||||
mMCode = mcode;
|
||||
mName = name;
|
||||
mDefaultTextureID = uuid;
|
||||
};
|
||||
|
||||
~LLMaterialInfo()
|
||||
{
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class LLMaterialTable
|
||||
{
|
||||
public:
|
||||
|
|
@ -185,5 +148,47 @@ public:
|
|||
static LLMaterialTable basic;
|
||||
};
|
||||
|
||||
|
||||
class LLMaterialInfo
|
||||
{
|
||||
public:
|
||||
U8 mMCode;
|
||||
std::string mName;
|
||||
LLUUID mDefaultTextureID;
|
||||
LLUUID mShatterSoundID;
|
||||
F32 mDensity; // kg/m^3
|
||||
F32 mFriction;
|
||||
F32 mRestitution;
|
||||
|
||||
// damage and energy constants
|
||||
F32 mHPModifier; // modifier on mass based HP total
|
||||
F32 mDamageModifier; // modifier on KE based damage
|
||||
F32 mEPModifier; // modifier on mass based EP total
|
||||
|
||||
LLMaterialInfo(U8 mcode, const std::string& name, const LLUUID &uuid)
|
||||
{
|
||||
init(mcode,name,uuid);
|
||||
};
|
||||
|
||||
void init(U8 mcode, const std::string& name, const LLUUID &uuid)
|
||||
{
|
||||
mDensity = 1000.f; // default to 1000.0 (water)
|
||||
mFriction = LLMaterialTable::DEFAULT_FRICTION;
|
||||
mRestitution = LLMaterialTable::DEFAULT_RESTITUTION;
|
||||
mHPModifier = 1.f;
|
||||
mDamageModifier = 1.f;
|
||||
mEPModifier = 1.f;
|
||||
|
||||
mMCode = mcode;
|
||||
mName = name;
|
||||
mDefaultTextureID = uuid;
|
||||
};
|
||||
|
||||
~LLMaterialInfo()
|
||||
{
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue