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 11:06:40 +01:00
parent fe0f0ad86f
commit 5c004e2c22

View file

@ -441,9 +441,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))