Take into account that the player origin may not be in his center

This is another corner case that looks more correct in baseq2. This was
reported by maraakate in yquake2 issue #160.
This commit is contained in:
Yamagi Burmeister 2016-12-17 10:35:29 +01:00
parent 89d48af99d
commit b16293c01b

View file

@ -316,9 +316,9 @@ M_CatagorizePosition(edict_t *ent)
}
/* get waterlevel */
point[0] = ent->s.origin[0];
point[1] = ent->s.origin[1];
point[2] = ent->s.origin[2] + ent->mins[2] + 1;
point[0] = (ent->absmax[0] + ent->absmin[0])/2;
point[1] = (ent->absmax[1] + ent->absmin[1])/2;
point[2] = ent->absmin[2] + 2;
cont = gi.pointcontents(point);
if (!(cont & MASK_WATER))