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

◆ IsClippingRoof()

bool Hologram::IsClippingRoof ( )
inlineprotected

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

476 {
477 if (CfgGameplayHandler.GetDisableIsClippingRoofCheck())
478 return false;
479 if (GetGame().IsServer() && GetGame().IsMultiplayer())
480 return false;
481
482 //Some locations allow you to look up and attempt placing the hologram on the bottom side of a floor - most notably the floors of a watchtower
483 //This check also prevents some very unnatural placements
484
485 bool b1 = m_Projection.GetPosition()[1] > GetGame().GetCurrentCameraPosition()[1];
486 bool b2 = false;
487 #ifdef DIAG_DEVELOPER
488 vector from, to;
489 #endif
490 if (m_Projection.DoPlacingHeightCheck())
491 {
492 b2 = MiscGameplayFunctions.IsUnderRoofEx(m_Projection, GameConstants.ROOF_CHECK_RAYCAST_DIST, ObjIntersectFire);
493 #ifdef DIAG_DEVELOPER
494 MiscGameplayFunctions.IsUnderRoofFromToCalculation(m_Projection, from, to);
495 DrawArrow(from, to, !b2);
496 #endif
497 }
498
499 #ifdef DIAG_DEVELOPER
500 DebugText("IsClippingRoof: ", false, b1, " | (projection height) " + m_Projection.GetPosition()[1] + " > (camera height) " + GetGame().GetCurrentCameraPosition()[1]);
501 DebugText("IsClippingRoof: ", false, b2, " | (DoPlacingHeightCheck) " + m_Projection.DoPlacingHeightCheck() + " && (IsUnderRoof) " + MiscGameplayFunctions.IsUnderRoof(m_Projection) + " | from: " + from[1] + " | to: " + to[1]);
502 #endif
503
504 return b1 || b2;
505 }
proto native vector GetCurrentCameraPosition()
EntityAI m_Projection
Определения Hologram.c:22
proto native CGame GetGame()

Перекрестные ссылки CGame::GetCurrentCameraPosition(), CfgGameplayHandler::GetDisableIsClippingRoofCheck(), GetGame(), m_Projection и GameConstants::ROOF_CHECK_RAYCAST_DIST.

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