self.havocbot_keyboardtime =
max(
self.havocbot_keyboardtime
- + bound(0,0.05/(sk+self.havocbot_keyboardskill),0.05)
- +random()*bound(0,0.025/(skill+self.havocbot_keyboardskill),100)
+ + 0.05/max(1, sk+self.havocbot_keyboardskill)
+ + random()*0.025/max(0.00025, skill+self.havocbot_keyboardskill)
, time);
keyboard = self.movement * (1.0 / maxspeed);
return;
// Don't jump when using some weapons
+ /*
if(self.aistatus & AI_STATUS_ATTACKING)
if(self.weapon & WEP_CAMPINGRIFLE)
return;
if(self.goalcurrent.classname == "player")
return;
+ */
maxspeed = cvar("sv_maxspeed");
}
// Release jump button
+ if(!cvar("sv_pogostick"))
if(self.flags & FL_ONGROUND == 0)
{
if(self.velocity_z < 0 || vlen(self.velocity)<maxspeed)
local float nex ; nex =-1000;
local float hagar ; hagar =-1000;
local float grenade ; grenade =-1000;
+ local float mine ; mine =-1000;
local float electro ; electro =-1000;
local float crylink ; crylink =-1000;
local float uzi ; uzi =-1000;
grenade = (cvar("g_balance_grenadelauncher_primary_damage")/cvar("g_balance_grenadelauncher_primary_refire")*1.0)
* bound(0,(cvar("g_balance_grenadelauncher_primary_speed")/distance*maxdelaytime),1)*1.1;
+ if (client_hasweapon(self, WEP_MINE_LAYER, TRUE, FALSE) &&
+ !(
+ cvar("bot_ai_weapon_combo") && self.weapon == WEP_MINE_LAYER &&
+ af > combo_time
+ )
+ )
+ mine = (cvar("g_balance_minelayer_damage")/cvar("g_balance_minelayer_refire")*1.0)
+ * bound(0,(cvar("g_balance_minelayer_speed")/distance*maxdelaytime),1)*1.1;
+
if (client_hasweapon(self, WEP_ELECTRO, TRUE, FALSE) &&
!( cvar("bot_ai_weapon_combo") && self.weapon == WEP_ELECTRO &&
af > combo_time
dprint("Nex: " , ftos(nex ), "\n");
dprint("Hagar: " , ftos(hagar ), "\n");
dprint("Grenade: ", ftos(grenade ), "\n");
+ dprint("Mine: " , ftos(mine ), "\n");
dprint("Electro: ", ftos(electro ), "\n");
dprint("Crylink: ", ftos(crylink ), "\n");
dprint("Uzi: " , ftos(uzi ), "\n");
w = WEP_NEX ;s = nex ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
w = WEP_HAGAR ;s = hagar ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
w = WEP_GRENADE_LAUNCHER ;s = grenade ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
+ w = WEP_MINE_LAYER ;s = mine ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
w = WEP_ELECTRO ;s = electro ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
w = WEP_CRYLINK ;s = crylink ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
w = WEP_UZI ;s = uzi ;if (s > bestscore){bestscore = s;bestweapon = w;} if (self.switchweapon == w) currentscore = s;
{
// LordHavoc: disabled because this is too expensive
return '0 0 0';
- /*
local entity head;
local vector dodge, v, n;
local float danger, bestdanger, vl, d;
head = head.chain;
}
return dodge;
- */
};