DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetWeightEx()

float Entity::GetWeightEx ( bool forceRecalc = false)
inlineprotected

returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging, using it in gameplay code is higly inadvisable as it bypasses the weight caching and has adverse effect on performance

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 3654

3655 {
3656 if (m_WeightDirty || forceRecalc)//recalculate
3657 {
3658 m_WeightEx = GetWeightSpecialized(forceRecalc);
3660
3661 #ifdef DEVELOPER
3662 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3663 {
3664 WeightDebug.GetWeightDebug(this).SetWeight(m_WeightEx);
3665 }
3666 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_DIRTY)
3667 {
3668 Print("ent:" + this + " - Dirty Recalc");
3669 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3670 {
3671 DumpStack();
3672 }
3673 }
3674 #endif
3675 }
3676
3677 return m_WeightEx;
3678 }
void ClearWeightDirty()
float GetWeightSpecialized(bool forceRecalc=false)
returns weight of the entity in a way that's specific to the entity type and is internal to the weigh...
float m_WeightEx
bool m_WeightDirty
proto void DumpStack()
Prints current call stack (stack trace)
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки ClearWeightDirty(), DumpStack(), GetWeightSpecialized(), m_WeightDirty, m_WeightEx и Print().

Используется в GetDebugText(), GetWeight() и OnAction().