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

◆ DecayHealthTick()

void BoatScript::DecayHealthTick ( )
inlineprotected

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

527 {
528 if ( (GetCEApi() && !GetCEApi().AvoidPlayer(GetPosition(), DECAY_PLAYER_RANGE)) || CfgGameplayHandler.GetBoatDecayMultiplier() <= 0 )
529 return;
530
531 float damage = DECAY_DAMAGE * CfgGameplayHandler.GetBoatDecayMultiplier();
532
533 if (IsFlipped())
534 damage *= DECAY_FLIPPED_MULT;
535
536 if (IsInFlagRange())
537 damage *= 0.3;
538
539 AddHealth("Engine","Health", -damage);
540 }
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:43
bool IsInFlagRange()
Определения BoatScript.c:542
const float DECAY_FLIPPED_MULT
Определения BoatScript.c:47
const float DECAY_DAMAGE
Определения BoatScript.c:46
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

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