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

◆ OnAction()

bool Entity::OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected

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

3610 {
3611 if (action_id == EActions.FIX_ENTITY)
3612 {
3613 #ifdef DIAG_DEVELOPER
3614 FixEntity();
3615 #endif
3616 }
3617 else if (action_id == EActions.GET_TOTAL_WEIGHT) //Prints total weight of item + its contents
3618 {
3619 WeightDebug.ClearWeightDebug();
3620 #ifndef SERVER
3621 Debug.Log("======================== "+ GetType() +" =================================");
3622 #endif
3623 Debug.Log("Weight:" + GetWeightEx().ToString());
3624 Debug.Log("Weight excluding cargo and attachments:" + GetSingleInventoryItemWeightEx());
3625 Debug.Log("----------------------------------------------------------------------------------------------");
3626 }
3627 else if (action_id == EActions.GET_TOTAL_WEIGHT_RECALC) //Prints total weight of item + its contents
3628 {
3629 WeightDebug.ClearWeightDebug();
3630 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3631 #ifndef SERVER
3632 Debug.Log("======================== "+ GetType() +" RECALC ===========================");
3633 #endif
3634 Debug.Log("Weight:" + GetWeightEx(true).ToString());
3635 Debug.Log("Weight excluding cargo and attachments:" + GetSingleInventoryItemWeightEx());
3636 WeightDebug.PrintAll(this);
3637 Debug.Log("----------------------------------------------------------------------------------------------");
3638 WeightDebug.SetVerbosityFlags(0);
3639 }
3640 else if (action_id == EActions.GET_PLAYER_WEIGHT) //Prints total weight of item + its contents
3641 {
3642 WeightDebug.ClearWeightDebug();
3643 #ifndef SERVER
3644 Debug.Log("======================== PLAYER: "+player+" ===========================");
3645 #endif
3646 Debug.Log("New overall weight Player:"+player.GetWeightEx().ToString());
3647
3648 Debug.Log("----------------------------------------------------------------------------------------------");
3649 }
3650 else if (action_id == EActions.GET_PLAYER_WEIGHT_RECALC) //Prints total weight of item + its contents
3651 {
3652 WeightDebug.ClearWeightDebug();
3653 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3654 #ifndef SERVER
3655 Debug.Log("======================== PLAYER RECALC: "+player+" ===========================");
3656 #endif
3657 Debug.Log("New overall weight Player:"+player.GetWeightEx(true).ToString());
3658 WeightDebug.PrintAll(player);
3659 Debug.Log("----------------------------------------------------------------------------------------------");
3660 WeightDebug.SetVerbosityFlags(0);
3661 }
3662 return false;
3663 }
eBleedingSourceType GetType()
Определения BleedingSource.c:63
EActions
Определения EActions.c:2
proto string ToString()
void Debug()
Определения UniversalTemperatureSource.c:349
float GetWeightEx(bool forceRecalc=false)
returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging,...
Определения EntityAI.c:3568
float GetSingleInventoryItemWeightEx()
Определения EntityAI.c:3596

Перекрестные ссылки GetSingleInventoryItemWeightEx(), GetType(), GetWeightEx(), Debug::Log() и ToString().