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

◆ TryBuildSyntheticCursor()

bool CCTLiquid::TryBuildSyntheticCursor ( PlayerBase player,
vector playerPos,
out vector syntheticHitPosition,
out int syntheticLiquidType )
inlineprotected

Client only. Server validates synced cursor position.

Let final validation detect exact liquid type.

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

606 {
607 syntheticHitPosition = vector.Zero;
608 syntheticLiquidType = LIQUID_NONE;
609
611 if (g_Game.IsHeadlessOrDedicatedServer())
612 return false;
613
615 {
616 if (TryBuildSeaLevelHitPosition(player, playerPos, syntheticHitPosition))
617 {
618 syntheticLiquidType = LIQUID_SALTWATER;
619 return true;
620 }
621 }
622
624 {
625 if (TryBuildPondHitPosition(player, playerPos, syntheticHitPosition))
626 {
628 syntheticLiquidType = LIQUID_FRESHWATER;
629 return true;
630 }
631 }
632
633 return false;
634 }
DayZGame g_Game
Определения DayZGame.c:4074
bool TryBuildPondHitPosition(PlayerBase player, vector playerPos, out vector pondHitPosition)
Определения CCTLiquid.c:431
int m_AllowedLiquidSource
Определения CCTLiquid.c:24
bool TryBuildSeaLevelHitPosition(PlayerBase player, vector playerPos, out vector seaHitPosition)
Определения CCTLiquid.c:325
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:566
const int LIQUID_FRESHWATER
Определения 3_Game/DayZ/constants.c:588
const int LIQUID_SALTWATER
Определения 3_Game/DayZ/constants.c:587

Перекрестные ссылки g_Game, LIQUID_FRESHWATER, LIQUID_NONE, LIQUID_SALTWATER, m_AllowedLiquidSource, TryBuildPondHitPosition(), TryBuildSeaLevelHitPosition() и vector::Zero.

Используется в TryResolveSyntheticCursor().