git-svn-id: https://svn.eduke32.com/eduke32@611 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-02-06 11:48:48 +00:00
parent b530c1ca75
commit ce81d4f061

View file

@ -190,16 +190,15 @@ int isanearoperator(int lotag)
inline int checkcursectnums(int sect) inline int checkcursectnums(int sect)
{ {
int i; int i = connecthead;
for (i=connecthead;i>=0;i=connectpoint2[i]) for (;i>=0;i=connectpoint2[i])
if (sprite[g_player[i].ps->i].sectnum == sect) return i; if (sprite[g_player[i].ps->i].sectnum == sect) return i;
return -1; return -1;
} }
inline int ldist(spritetype *s1,spritetype *s2) inline int ldist(spritetype *s1,spritetype *s2)
{ {
int ret = FindDistance2D(s1->x-s2->x, s1->y-s2->y); return (FindDistance2D(s1->x-s2->x, s1->y-s2->y));
return (ret?ret:1);
} }
inline int dist(spritetype *s1,spritetype *s2) inline int dist(spritetype *s1,spritetype *s2)