by Spike » Fri Apr 27, 2007 2:25 pm
And yes, '-16 -16 0' '16 16 0' is <=32 units in the x direction so qualifies for hull1 (player sized) (y and z are ignored for choosing hulls).
From the engine code:
// calculate an offset value to center the origin
VectorSubtract (hull->clip_mins, mins, offset);
VectorAdd (offset, ent->v.origin, offset);
or, in qc with the relevent values inserted
offset = '-16 -16 -24' - '-16 -16 0';
offset = offset + ent.origin;
Or, in other words, use a mins_z of 0 and the grenade is moved down by 24 units, so will always teleport the player into the ceiling in small passageways.
(effectivly you're using a '-16 -16 -48' '16 16 8' min max for world collisions... which of course means that teleporting the player in puts them 24 units into the air, due to the differences in sizes)
I have no idea why the engine code does this.
The max size being a bit taller makes no difference except for entity/entity collisions (rockets, nails, etc). But the min size being different offsets it in wieeeerd ways.
Just for an example, change the player's max_z to something like 1024... Notice how you can still run through small passageways, exactly as before. Change min_z, notice how you get stuck when you spawn.
.