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

◆ DecayHealthTick()

void BoatScript::DecayHealthTick ( )
inlineprotected

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

535 {
536 if ( (GetCEApi() && !GetCEApi().AvoidPlayer(GetPosition(), DECAY_PLAYER_RANGE)) || CfgGameplayHandler.GetBoatDecayMultiplier() <= 0 )
537 return;
538
539 float damage = DECAY_DAMAGE * CfgGameplayHandler.GetBoatDecayMultiplier();
540
541 if (IsFlipped())
542 damage *= DECAY_FLIPPED_MULT;
543
544 if (IsInFlagRange())
545 damage *= 0.3;
546
547 AddHealth("Engine","Health", -damage);
548 }
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:550
const float DECAY_FLIPPED_MULT
Определения BoatScript.c:47
const float DECAY_DAMAGE
Определения BoatScript.c:46
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

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