deploy()
{
self endon("disconnect");
self endon("death");
angles = self getPlayerAngles();
start = self.origin + (0,0,40) + maps\mp\_utility::vectorScale(anglesToForward( angles ), 20);
end = self.origin + (0,0,40) + maps\mp\_utility::vectorScale(anglesToForward( angles ), 38);
left = maps\mp\_utility::vectorScale(anglesToRight( angles ), -10);
right = maps\mp\_utility::vectorScale(anglesToRight( angles ), 10);
back = maps\mp\_utility::vectorScale(anglesToForward( angles ), -6);
canPlantThere1 = BulletTracePassed( start, end, true, self);
canPlantThere2 = BulletTracePassed( start + left, end + left + back, true, self);
canPlantThere3 = BulletTracePassed( start + right , end + right + back, true, self);
if( !canPlantThere1 || !canPlantThere2 || !canPlantThere3 )
{
return false;
}
trace = bulletTrace( end + (0,0,100), end - (0,0,300), false, self );
if(trace["surfacetype"] == "default" || trace["surfacetype"] == "none")
{
return false;
}
return true;
}