v_res = vectoangles(v_res);
v_res = v_res - from.angles;
- if (v_res_x < 0) v_res_x += 360;
- if (v_res_x > 180) v_res_x -= 360;
+ if (v_res.x < 0) v_res.x += 360;
+ if (v_res.x > 180) v_res.x -= 360;
- if (v_res_y < 0) v_res_y += 360;
- if (v_res_y > 180) v_res_y -= 360;
+ if (v_res.y < 0) v_res.y += 360;
+ if (v_res.y > 180) v_res.y -= 360;
return v_res;
}
v_res = vectoangles(v_res);
v_res = v_res - from_a;
- if (v_res_x < 0) v_res_x += 360;
- if (v_res_x > 180) v_res_x -= 360;
+ if (v_res.x < 0) v_res.x += 360;
+ if (v_res.x > 180) v_res.x -= 360;
- if (v_res_y < 0) v_res_y += 360;
- if (v_res_y > 180) v_res_y -= 360;
+ if (v_res.y < 0) v_res.y += 360;
+ if (v_res.y > 180) v_res.y -= 360;
return v_res;
}
{
error("Call to turret_tag_fire_update with self.tur_head missing!\n");
self.tur_shotorg = '0 0 0';
- return FALSE;
+ return false;
}
self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire"));
v_forward = normalize(v_forward);
- return TRUE;
+ return true;
}
/*
// note down which entities were hit so we can damage them later
while (1)
{
- tracebox(start, smin, smax, end, FALSE, self);
+ tracebox(start, smin, smax, end, false, self);
// if it is world we can't hurt it so stop now
if (trace_ent == world || trace_fraction == 1)
break;
// make the entity non-solid so we can hit the next one
- trace_ent.railgunhit = TRUE;
+ trace_ent.railgunhit = true;
trace_ent.railgunhitloc = end;
trace_ent.railgunhitsolidbackup = trace_ent.solid;
endpoint = trace_endpos;
// find all the entities the railgun hit and restore their solid state
- ent = findfloat(world, railgunhit, TRUE);
+ ent = findfloat(world, railgunhit, true);
while (ent)
{
// restore their solid type
ent.solid = ent.railgunhitsolidbackup;
- ent = findfloat(ent, railgunhit, TRUE);
+ ent = findfloat(ent, railgunhit, true);
}
// find all the entities the railgun hit and hurt them
- ent = findfloat(world, railgunhit, TRUE);
+ ent = findfloat(world, railgunhit, true);
while (ent)
{
// get the details we need to call the damage function
hitloc = ent.railgunhitloc;
ent.railgunhitloc = '0 0 0';
ent.railgunhitsolidbackup = SOLID_NOT;
- ent.railgunhit = FALSE;
+ ent.railgunhit = false;
// apply the damage
if (ent.takedamage)
}
// advance to the next entity
- ent = findfloat(ent, railgunhit, TRUE);
+ ent = findfloat(ent, railgunhit, true);
}
trace_endpos = endpoint;
}