function smoothturn(ent1,ent2,speed# = 1) s# = DeltaYaw(ent1,ent2) turnentity ent1,0,speed * sign(s),0 endfunction