Why not just use this:

Code:


var gravity[3] = 0,0,-9.8; // gravity = 9.8 m/s^2 in the negative z direction

..
bunch of code
..

action player_walk
{
..
bunch more code
..

vec_set(temp.x, gravity.x);
temp.z *= time;

ent_move(player_speed, temp);




The above method uses the level collision already being done. When you walk of a ledge, you fall down at 9.8 m/s * time between last frame. It isn't actually acceleration the entity, just moving it 9.8 quants/sec. Probably by combining the trace and the gravity, you could get acceleration due to gravity on some form or another.