Does anyone know how to lower the hitboxes ( a.k.a. ps.maxs[2] ) when a player is wounded? It seems to be set to CROUCH_VIEWHEIGHT in vanilla et. I’ve tried lowering it, and it works, but bodies are getting stuck into walls when they are revived.
corpse hitboxes
Hi Rain.
Initially I tried ingoring ydnar’s warning and adjusting it in player_die() g_combat.c:
// ydnar: so bodies don't clip into world
self->r.maxs[2] = self->client->ps.crouchMaxZ;
self->client->ps.maxs[2] = self->client->ps.crouchMaxZ;
I’ve come to the conclusion now that if the client->ps.maxs[2] is anything less than 12 the player will get stuck in things. I haven’t found a good solution for fixing this.
However, I have come up with a rather ugly workaround. That is to lower the maxs[2] temporarily in Bullet_Fire_Extended() in g_weapon.c when a player is hit and re-run the trace. Then I turn it back up to what it was prior. It’s a work in progress, but I think I’m finally getting the “stuck in wall” problem sorted out. See:
http://et.tjw.org/etpub/hitboxes/
Is there a better way?
there really isnt any better way, unless you want to fundamentally change the way revives are done.
etpro uses a similar technique to what you’re using.
yea Im having the same problem… where if I lower the corpse boxes they’ll get stuck into stuff… it really sucks 
I read it but I dont agree with it. Why would you change code in a function that has nothing to do with reviving a corpse? its doing too much work in a place its not needed
are bounding boxes and hit boxes the same thing?