It's this line:
c_move(me, vector(0,0,jumpheight), NULL, GLIDE);
Switch the vector() and the NULL (also I think you should use nullvector instead of NULL for good practice):
c_move(me, nullvector, vector(0,0,jumpheight), GLIDE);
That should fix it. The first vector tells c_move how far to move the entity in RELATION to himself. So your player's "up" was really "up and forward" because he was leaning forward. But the second vector moves the entity according to absolute coordinates, i.e. WED coordinates, with no regard given to what the entity's pan, tilt, and roll were. Thus the second vector should always be used for gravity, jumping, wind, etc. Sorry I didn't catch that before.
EDIT: You'll of course have to change both times c_move appears in your function.
Last edited by Logan; 02/02/11 17:43.