466 {
469 return -1;
470
471 if (pTarget)
472 {
473 if (pTarget == cursorTarget)
474 {
476 if (pTarget.GetType() == string.Empty)
477 return 0.01;
478
479 if (pTarget.IsBuilding())
480 return 0.25;
481
482 if (pTarget.IsTransport())
483 return 0.25;
484
486 if (pTarget.CanUseConstruction())
487 return 0.85;
488
489 if (pTarget.IsWell())
490 return 0.9;
491
492 vector playerPosXZ =
m_Player.GetPosition();
493 vector hitPosXZ = hitPos;
494 playerPosXZ[1] = 0;
495 hitPosXZ[1] = 0;
498 }
499
500 if ( PlayerBase.Cast(pTarget) && PlayerBase.Cast(pTarget).IsInVehicle() )
501 return 0.20;
502
505 }
506
509 return 0.01;
510
511 return -1;
512 }
const float c_UtilityMaxDistFromRaySqr
const float c_MaxTargetDistance
float DistSqrPoint2Line(vector pPoint, vector pL1, vector pL2)
distance between point and line
PlayerBase m_Player
player owner
const float c_UtilityMaxValue
utility constants
proto int GetLiquidType()
See 'LiquidTypes' in 'constants.c'.