grenade fixes, const-ify some arguments

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1939 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-05-12 14:54:10 +00:00
parent 8cf45ff9d2
commit 8de09611a3
7 changed files with 52 additions and 52 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ physent *hitplayer = NULL;
bool plcollide(physent *d, physent *o, float &headspace, float &hi, float &lo) // collide with physent
{
if(o->state!=CS_ALIVE) return true;
if(o->state!=CS_ALIVE || !o->cancollide) return true;
const float r = o->radius+d->radius, dx = o->o.x-d->o.x, dy = o->o.y-d->o.y;
const float deyeheight = d->dyneyeheight(), oeyeheight = o->dyneyeheight();
if(d->type==ENT_PLAYER && o->type==ENT_PLAYER ? dx*dx + dy*dy < r*r : fabs(dx)<r && fabs(dy)<r)