Hello. Is there any other chance to limit z Glide?

I know disable_z_glide. But z glide is needed, so this is no option.
Also move_min_z is no solution. It does not really help.

I had the idea to limit z with this example:

c_move ............. GLIDE

If (my.z > 10) {my.z = 10)

So z 10 should never be exceeded.

But as far as I know Glide is checking the area 6 times.

So it seems that the my.z = 10 instruction does not really work. Only some frames later.
I saw that the model was exceeding this limit.

Is there any other idea to limit z?

Why is glide needed?

For example: Because some parts are a little bit higher than the base line. The enemy must walk over it with Glide. And im this example no part is higher than 9. So 10 would be a good limit. The problem are the walls. So it is possible that the enemy is gliding along a wall and is jumping on the top of it and back for a frame or more. And this should not happen.

Maybe there is a chance to limit z directly in the c_move, also with glide???