here is my code:

var video_depth=32;
var video_mode=7;
var video_screen =2;

entity* = guard;

action guard_player1
{
var walk =0;
var stand = 0;
var run = 0;
guard = me;
while(1)
{
if(key_cuu)
{
standdist=0;
walkdist+=1;
c_move(me,vector(0.7,0,0),nullvector,glide);
ent_animate(me,"walk",walk,anm_cycle);
}
if(key_cuu && key_shift)
{
standdist=0;
rundist + =1.5;
ent_animate(me,"run",run,anm_cycle);
c_move(me,vector(1,0,0),nullvector,glide);
}
if(key_cuu == off)
{
standdist + = 0.2;
walkdist = 0;
ent_animate(me,"stand",stand,anm_cycle);
}
if(key_cul == on)
{
my.pan+=1;
}
if(key_cur == on)
{
my.pan-=1;
}
wait(1);
}
}

function main()
{
level_load("level1.wmb");
wait(1);
camera.tilt = -45;
camera.pan = 35;
while(1)
{
if(key_a){camera.x-=1.4; camera.y+=2;}
if(key_d){camera.y-=2; camera.x+=1.4;}
if(key_w){camera.x+=2; camera.y+=1.4;}
if(key_s){camera.x-=2; camera.y-=1.4;}
wait(1);
}
}

the problem is that when the model collides with any block and I press the left or the right arrow key, the model go through the wall ...

how to fix this??