A radius of 40 means, that they have to stay almost inside each other to activate the slapping.
An example: In DT2, where most people camp right before the barrier at the panic event, they will get slapped.
@
eyeonus: A situation. 4 survivors standing in one corner. One of them is incap. After the execution of this code:
Code:
if (IsValidEntity(i) && (GetClientTeam(i) == 2) && IsPlayerAlive(i) && (GetEntProp(i, Prop_Send, "m_isIncapacitated") != 1)) {
GetClientAbsOrigin(i, location[client]) //Get client's position.
z_location[client] = location[client][2] //Need to check z-distance separately.
location[client][2] = 0.0
clients[client] = i
client++
}
there will be a "3" stored in the client variable. And only the first 3 cells of the array will be filled. So, then you execute this code:
Code:
distance[0] = GetVectorDistance(location[0], location[1])
z_distance[0] = FloatAbs(z_location[0]-z_location[1])
distance[1] = GetVectorDistance(location[0], location[2])
z_distance[1] = FloatAbs(z_location[0]-z_location[2])
distance[2] = GetVectorDistance(location[0], location[3])
z_distance[2] = FloatAbs(z_location[0]-z_location[3])
distance[3] = GetVectorDistance(location[1], location[2])
z_distance[3] = FloatAbs(z_location[1]-z_location[2])
distance[4] = GetVectorDistance(location[1], location[3])
z_distance[4] = FloatAbs(z_location[1]-z_location[3])
distance[5] = GetVectorDistance(location[2], location[3])
z_distance[5] = FloatAbs(z_location[2]-z_location[3])
Theoretically there will nothing special happen, because in location[3] and z_location[3] are zeros stored, but you dont know, that on some special custom map, there is a corner right near the 0-0-0 cordinates. Then there will be an error. ;-)