DayZ 1.27
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

См. определение в файле EntityAI.c строка 3568

3569 {
3570 if (m_WeightDirty || forceRecalc)//recalculate
3571 {
3572 m_WeightEx = GetWeightSpecialized(forceRecalc);
3574
3575 #ifdef DEVELOPER
3576 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3577 {
3578 WeightDebug.GetWeightDebug(this).SetWeight(m_WeightEx);
3579 }
3580 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_DIRTY)
3581 {
3582 Print("ent:" + this + " - Dirty Recalc");
3583 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3584 {
3585 DumpStack();
3586 }
3587 }
3588 #endif
3589 }
3590
3591 return m_WeightEx;
3592 }
void ClearWeightDirty()
Определения EntityAI.c:3506
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...
Определения EntityAI.c:3561
float m_WeightEx
Определения EntityAI.c:127
bool m_WeightDirty
Определения EntityAI.c:105
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().