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