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

◆ DecreaseHealth() [3/3]

void IEntity::DecreaseHealth ( string zoneName,
string healthType,
float value,
bool auto_delete )
inlineprivate

Decreases health with the option of auto-deleting the object if its ruined.

Аргументы
zoneNameif empty string, sets state of global health
healthTypeif empty string, sets state of main health

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

1046 {
1047 DecreaseHealth(zoneName, healthType, value);
1048
1049 if (auto_delete)
1050 {
1051 float result_health = GetHealth(zoneName, healthType);
1052 if (result_health <= 0)
1053 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.ObjectDelete, this);
1054 }
1055 }
DayZGame g_Game
Определения DayZGame.c:3942
float GetHealth()
Equivalent of GetHealth("", "");.
Определения Object.c:1058
proto native void DecreaseHealth(string zoneName, string healthType, float value)
Decreases health.
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, DecreaseHealth(), g_Game и GetHealth().