To avoid this make sure you use c_move() for the movement and include a check for getting stuck by a collision in the while() condition.
It would look something like this:
target_z = my.z + jump_height;
result = 1;
//MOVEMENT UPWARDS TILL YOU HIT THE CEILING
while((my.z < target_z) && (result>0))
{
result = c_move(me,vector(0,0,(jump_speed*time_step)),nullvector,IGNORE_PASSABLE|GLIDE);
}
A note on c_move from the manuall to clarify what "result" is being used for:
The c_move function returns the amount of distance covered. If the entity could not move at all due to being blocked by obstacles, it returns a negative value or 0.
Hope this helps.
If you need a more detailed explanation head on to the other thread you created regarding jump height and time_step.
You might have missed it, but while answering your previous question yesterday I thought this "floating" might be your next problem with jumps, so i adressed both problems in that thread with a more extense step-by-step explanation:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=381979&page=2