set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle rocketlauncher minelayer grenadelauncher electro hagar hlac crylink laser uzi fireball seeker shotgun tuba" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker minelayer grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba seeker hagar crylink minelayer grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority"
+set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro campingrifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority"
set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
set bot_ai_weapon_combo_threshold 0.3 "Try to make a combo N seconds after the last attack"
set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
if(hud_panel_radar_rotation == 0)
{
// max-min distance must fit the radar in any rotation
- bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_max - mi_min));
+ bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_scale));
}
else
{
f * bigsize
+ (1 - f) * normalsize;
teamradar_origin3d_in_texcoord = teamradar_3dcoord_to_texcoord(
- f * (mi_min + mi_max) * 0.5
+ f * mi_center
+ (1 - f) * view_origin);
color1 = GetPlayerColor(player_localentnum-1);
void WaypointSprite_Load()
{
- waypointsprite_fadedistance = vlen(mi_max - mi_min);
+ waypointsprite_fadedistance = vlen(mi_scale);
waypointsprite_normdistance = autocvar_g_waypointsprite_normdistance;
waypointsprite_minscale = autocvar_g_waypointsprite_minscale;
waypointsprite_minalpha = autocvar_g_waypointsprite_minalpha;
waypointsprite_crosshairfadedistance = autocvar_g_waypointsprite_crosshairfadedistance;
waypointsprite_distancefadealpha = autocvar_g_waypointsprite_distancefadealpha;
waypointsprite_distancefadescale = autocvar_g_waypointsprite_distancefadescale;
- waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * autocvar_g_waypointsprite_distancefadedistancemultiplier;
- waypointsprite_alpha = autocvar_g_waypointsprite_alpha * (1 - autocvar__menu_alpha);
+ waypointsprite_distancefadedistance = waypointsprite_fadedistance * autocvar_g_waypointsprite_distancefadedistancemultiplier;
+ waypointsprite_alpha = autocvar_g_waypointsprite_alpha;
if(!waypointsprite_initialized)
{
db_put(tempdb, sname, ftos(max(f, stof(db_get(tempdb, sname)))));
}
search_end(dh);
+ waypointsprite_initialized = true;
}
- waypointsprite_initialized = 1;
}
// WEAPON PLUGIN SYSTEM
-entity weapon_info[24];
+entity weapon_info[WEP_MAXCOUNT];
entity dummy_weapon_info;
void register_weapon(float id, float(float) func, float ammotype, float i, float weapontype, float pickupbasevalue, string modelname, string shortname, string wname)
float i;
weaponorder_byid = "";
- for(i = 24; i >= 1; --i)
+ for(i = WEP_MAXCOUNT; i >= 1; --i)
if(weapon_info[i-1])
weaponorder_byid = strcat(weaponorder_byid, " ", ftos(i));
weaponorder_byid = strzone(substring(weaponorder_byid, 1, strlen(weaponorder_byid) - 1));
needarmor = TRUE;
// Needs weapons?
- for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+ for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
{
// Find weapon
if(power2of(i-1) & self.weapons)
if (g_weaponarena)
{
start_weapons = g_weaponarena;
- if (g_weaponarena & (WEPBIT_GRENADE_LAUNCHER | WEPBIT_MINE_LAYER | WEPBIT_HAGAR | WEPBIT_ROCKET_LAUNCHER))
- start_ammo_rockets = 999;
- if (g_weaponarena & WEPBIT_SHOTGUN)
- start_ammo_shells = 999;
- if (g_weaponarena & (WEPBIT_ELECTRO | WEPBIT_CRYLINK | WEPBIT_NEX | WEPBIT_MINSTANEX | WEPBIT_HLAC | WEPBIT_HOOK))
- start_ammo_cells = 999;
- if (g_weaponarena & (WEPBIT_UZI | WEPBIT_CAMPINGRIFLE))
- start_ammo_nails = 999;
- if (g_weaponarena & WEPBIT_HOOK)
- start_ammo_fuel = 999;
+ for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+ {
+ e = get_weaponinfo(j);
+ if(start_weapons & e.weapons)
+ {
+ if(e.items & IT_ROCKETS)
+ start_ammo_rockets = 999;
+ if(e.items & IT_SHELLS)
+ start_ammo_shells = 999;
+ if(e.items & IT_CELLS)
+ start_ammo_cells = 999;
+ if(e.items & IT_NAILS)
+ start_ammo_nails = 999;
+ if(e.items & IT_FUEL)
+ start_ammo_fuel = 999;
+ }
+ }
start_items |= IT_UNLIMITED_AMMO;
}
else if (g_minstagib)
// If custom weapon priorities for bots is enabled rate most wanted weapons higher
if( bot_custom_weapon && c )
{
- for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+ for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
{
// Find weapon
if( (get_weaponinfo(i)).weapons & item.weapons != item.weapons )
c = 0;
// Detect needed ammo
- for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+ for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
{
wi = get_weaponinfo(i);
if(autocvar_g_balance_crylink_secondary_joinexplode)
{
n = n / autocvar_g_balance_crylink_secondary_shots;
- RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n,
- autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n,
- autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner,
+ RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n,
+ autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n,
+ autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner,
autocvar_g_balance_crylink_secondary_joinexplode_force * n, e.projectiledeathtype, other);
pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
- }
+ }
}
else
{
if(autocvar_g_balance_crylink_primary_joinexplode)
{
n = n / autocvar_g_balance_crylink_primary_shots;
- RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n,
- autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n,
- autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner,
+ RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n,
+ autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n,
+ autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner,
autocvar_g_balance_crylink_primary_joinexplode_force * n, e.projectiledeathtype, other);
pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
- }
- }
+ }
+ }
}
}
remove(self);
{
if (req == WR_AIM)
{
- if (random() > 0.15)
+ if (random() < 0.10)
self.BUTTON_ATCK = bot_aim(autocvar_g_balance_crylink_primary_speed, 0, autocvar_g_balance_crylink_primary_middle_lifetime, FALSE);
else
self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_crylink_secondary_speed, 0, autocvar_g_balance_crylink_secondary_middle_lifetime, FALSE);
{
vector pos;
entity linkjoineffect;
-
-
+
+
if(self.crylink_waitrelease == 1)
{
pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
-
+
}
else
{
pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_secondary_joinspread * autocvar_g_balance_crylink_secondary_speed, autocvar_g_balance_crylink_secondary_jointime);
}
-
+
linkjoineffect = spawn();
linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
- linkjoineffect.classname = "linkjoineffect";
+ linkjoineffect.classname = "linkjoineffect";
linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
linkjoineffect.owner = self;
setorigin(linkjoineffect, pos);
void W_Plasma_Touch (void)
{
//self.velocity = self.velocity * 0.1;
-
+
PROJECTILE_TOUCH;
if (other.takedamage == DAMAGE_AIM) {
W_Plasma_Explode ();
proj.health = autocvar_g_balance_electro_secondary_health;
proj.event_damage = W_Plasma_Damage;
proj.flags = FL_PROJECTILE;
-
+
proj.bouncefactor = autocvar_g_balance_electro_secondary_bouncefactor;
proj.bouncestop = autocvar_g_balance_electro_secondary_bouncestop;
-
+
#if 0
entity p2;
p2 = spawn();
self.bot_secondary_electromooth = 0;
if(self.bot_secondary_electromooth == 0)
{
- if(bot_aim(autocvar_g_balance_electro_primary_speed, 0, autocvar_g_balance_electro_primary_lifetime, FALSE))
+ float shoot;
+
+ if(autocvar_g_balance_electro_primary_speed)
+ shoot = bot_aim(autocvar_g_balance_electro_primary_speed, 0, autocvar_g_balance_electro_primary_lifetime, FALSE);
+ else
+ shoot = bot_aim(1000000, 0, 0.001, FALSE);
+
+ if(shoot)
{
self.BUTTON_ATCK = TRUE;
if(random() < 0.01) self.bot_secondary_electromooth = 1;
{
local entity missile;
- if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - autocvar_g_balance_seeker_missile_ammo;
makevectors(self.v_angle);
float w_shotgun(float req)
{
if (req == WR_AIM)
- if(vlen(self.origin-self.enemy.origin)>200)
- self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
- else
+ if(vlen(self.origin-self.enemy.origin) <= autocvar_g_balance_shotgun_secondary_melee_range)
self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE);
+ else
+ self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
else if (req == WR_THINK)
{
if (self.BUTTON_ATCK)
*3D Art
morphed
+*Concept Art
+LJFHutch
+theShadow
+
*Level Design
FruitieX
MirceaKitsune