}
else
{
- if not(self.jumppadcount)
+ if (!self.jumppadcount)
self.havocbot_role();
}
havocbot_movetogoal();
// if the bot is not attacking, consider reloading weapons
- if not(self.aistatus & AI_STATUS_ATTACKING)
+ if (!(self.aistatus & AI_STATUS_ATTACKING))
{
float i;
entity e;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo"))))
+ if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < e.reloading_ammo))
self.switchweapon = i;
}
}
if(self.aistatus & AI_STATUS_ROAMING)
if(self.goalcurrent.classname=="waypoint")
- if not(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL)
+ if (!(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL))
if(fabs(gco_z - self.origin_z) < self.maxs_z - self.mins_z)
if(self.goalstack01!=world)
{
}
// Take off
- if not(self.aistatus & AI_STATUS_JETPACK_FLYING)
+ if (!(self.aistatus & AI_STATUS_JETPACK_FLYING))
{
// Brake almost completely so it can get a good direction
if(vlen(self.velocity)>10)
else if(self.aistatus & AI_STATUS_OUT_JUMPPAD)
self.aistatus &= ~AI_STATUS_OUT_JUMPPAD;
- // If there is a trigger_hurt right below try to use the jetpack or make a rocketjump // WEAPONTODO: move this to bot think!
+ // If there is a trigger_hurt right below try to use the jetpack or make a rocketjump
if(skill>6)
- if not(self.flags & FL_ONGROUND)
+ if (!(self.flags & FL_ONGROUND))
{
tracebox(self.origin, self.mins, self.maxs, self.origin + '0 0 -65536', MOVE_NOMONSTERS, self);
if(tracebox_hits_trigger_hurt(self.origin, self.mins, self.maxs, trace_endpos ))
vector dst_ahead, dst_down;
makevectors(self.v_angle_y * '0 1 0');
dst_ahead = self.origin + self.view_ofs + (self.velocity * 0.4) + (v_forward * 32 * 3);
- dst_down = dst_ahead + '0 0 -1500';
+ dst_down = dst_ahead - '0 0 1500';
// Look ahead
- traceline(self.origin + self.view_ofs , dst_ahead, TRUE, world);
+ traceline(self.origin + self.view_ofs, dst_ahead, TRUE, world);
// Check head-banging against walls
if(vlen(self.origin + self.view_ofs - trace_endpos) < 25 && !(self.aistatus & AI_STATUS_OUT_WATER))
{
// If no weapon was chosen get the first available weapon
if(self.weapon==0)
- for(i=WEP_LASER + 1; i < WEP_COUNT ; ++i)
+ for(i=WEP_BLASTER + 1; i < WEP_COUNT ; ++i) // Samual: This seems strange compared to other weapon loops...
{
if(client_hasweapon(self, i, TRUE, FALSE))
{