407 {
410 return -1;
411
412 if (pTarget)
413 {
414 if ( pTarget == cursorTarget )
415 {
417 if ( pTarget.GetType() == string.Empty )
418 return 0.01;
419
420 if ( pTarget.IsBuilding() )
421 return 0.25;
422
423 if ( pTarget.IsTransport() )
424 return 0.25;
425
427 if (pTarget.CanUseConstruction())
428 return 0.85;
429
430 if ( pTarget.IsWell() )
431 return 0.9;
432
433 vector playerPosXZ =
m_Player.GetPosition();
434 vector hitPosXZ = hitPos;
435 playerPosXZ[1] = 0;
436 hitPosXZ[1] = 0;
439 }
440
441 if ( PlayerBase.Cast(pTarget) && PlayerBase.Cast(pTarget).IsInVehicle() )
442 return 0.20;
443
446 }
447
448 return -1;
449 }
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