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;
if(!waypointsprite_initialized)
{
db_put(tempdb, sname, ftos(max(f, stof(db_get(tempdb, sname)))));
}
search_end(dh);
+ waypointsprite_initialized = true;
}
- waypointsprite_initialized = 1;
}
return vercmp_recursive(v1, v2);
}
+
+float u8_strsize(string s)
+{
+ float l, i, c;
+ l = 0;
+ for(i = 0; ; ++i)
+ {
+ c = str2chr(s, i);
+ if(c <= 0)
+ break;
+ ++l;
+ if(c >= 0x80)
+ ++l;
+ if(c >= 0x800)
+ ++l;
+ if(c >= 0x10000)
+ ++l;
+ }
+ return l;
+}
#endif
float vercmp(string v1, string v2);
+
+float u8_strsize(string s);
ATTRIB(InputBox, forbiddenCharacters, string, "")
ATTRIB(InputBox, color, vector, '1 1 1')
ATTRIB(InputBox, colorF, vector, '1 1 1')
- ATTRIB(InputBox, maxLength, float, 255)
+ ATTRIB(InputBox, maxLength, float, 255) // if negative, it counts bytes, not chars
ENDCLASS(InputBox)
void InputBox_Clear_Click(entity btn, entity me);
#endif
for(i = 0; i < strlen(ch); ++i)
if(strstrofs(me.forbiddenCharacters, substring(ch, i, 1), 0) > -1)
return;
- if(strlen(ch) + strlen(me.text) > me.maxLength)
- return;
+ if(me.maxLength > 0)
+ {
+ if(strlen(ch) + strlen(me.text) > me.maxLength)
+ return;
+ }
+ else if(me.maxLength < 0)
+ {
+ if(u8_strsize(ch) + u8_strsize(me.text) > -me.maxLength)
+ return;
+ }
me.setText(me, strcat(substring(me.text, 0, me.cursorPos), ch, substring(me.text, me.cursorPos, strlen(me.text) - me.cursorPos)));
me.cursorPos += strlen(ch);
}
me.TR(me);
me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name"));
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
- box.maxLength = 63;
+ box.maxLength = -63; // negativ means encoded length in bytes
label.textEntity = box;
me.TR(me);
me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
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;
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