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

◆ DecayHealthTick()

void BoatScript::DecayHealthTick ( )
inlineprotected

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

481 {
482 if ( (GetCEApi() && !GetCEApi().AvoidPlayer(GetPosition(), DECAY_PLAYER_RANGE)) || CfgGameplayHandler.GetBoatDecayMultiplier() <= 0 )
483 return;
484
485 float damage = DECAY_DAMAGE * CfgGameplayHandler.GetBoatDecayMultiplier();
486
487 if (IsFlipped())
488 damage *= DECAY_FLIPPED_MULT;
489
490 if (IsInFlagRange())
491 damage *= 0.3;
492
493 AddHealth("Engine","Health", -damage);
494 }
proto native bool AvoidPlayer(vector vPos, float fDistance)
Check if there is a player within a radius.
proto native CEApi GetCEApi()
Get the CE API.
const int DECAY_PLAYER_RANGE
Определения BoatScript.c:32
bool IsInFlagRange()
Определения BoatScript.c:496
const float DECAY_FLIPPED_MULT
Определения BoatScript.c:36
const float DECAY_DAMAGE
Определения BoatScript.c:35
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки AvoidPlayer(), DECAY_DAMAGE, DECAY_FLIPPED_MULT, DECAY_PLAYER_RANGE, CfgGameplayHandler::GetBoatDecayMultiplier(), GetCEApi(), GetPosition и IsInFlagRange().