476 {
477 if (CfgGameplayHandler.GetDisableIsClippingRoofCheck())
478 return false;
480 return false;
481
482
483
484
486 bool b2 = false;
487 #ifdef DIAG_DEVELOPER
488 vector from, to;
489 #endif
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()
proto native CGame GetGame()