*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@526 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -346,7 +346,7 @@ int nearestenemy(vec *v, string team)
|
||||
if(!other) continue;
|
||||
if(isteam(team,other->team))continue; // its a teammate
|
||||
vec place = {v->x, v->y, v->z};
|
||||
vdistsquared(distsquared, t, place, other->o);
|
||||
float distsquared = vec(other->o).sub(place).squaredlen();
|
||||
if(nearestPlayerDistSquared == -1) nearestPlayerDistSquared = distsquared; // first run
|
||||
else if(distsquared < nearestPlayerDistSquared) nearestPlayerDistSquared = distsquared; // if a player is closer
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user