1060 {
1062 {
1063 bool found = false;
1064 vector head_pos =
g_Game.GetCurrentCameraPosition();
1065 float distance;
1066 foreach( Man player : ClientData.m_PlayerBaseList )
1067 {
1068 vector target_player = player.GetPosition();
1069 distance = vector.Distance( head_pos, target_player );
1070
1071 target_player[1] = target_player[1] + 1.2;
1072
1073 if( distance <= 15 && player !=
g_Game.GetPlayer() )
1074 {
1075 vector screen_pos =
g_Game.GetScreenPosRelative( target_player );
1076 vector end_pos = head_pos +
g_Game.GetCurrentCameraDirection() * 25;
1077 RaycastRVParams params =
new RaycastRVParams( head_pos, end_pos,
g_Game.GetPlayer(), 0 );
1079
1080 array<ref RaycastRVResult> results = new array<ref RaycastRVResult>;
1081 DayZPhysics.RaycastRVProxy( params, results );
1082 if( results.Count() > 0 )
1083 {
1084 if( results.Get( 0 ).
obj == player )
1085 {
1087 found = true;
1088 }
1089 }
1090 }
1091 }
1092 if( !found )
1093 {
1095 }
1096 }
1097 }
PlayerBase m_CurrentTaggedPlayer
bool sorted
used only if groundOnly = false
Object obj
Object inside of box.