]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'refs/remotes/origin/terencehill/bot_vs_human_fix'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 15 Jun 2010 09:08:10 +0000 (11:08 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 15 Jun 2010 09:08:10 +0000 (11:08 +0200)
1  2 
defaultXonotic.cfg
qcsrc/server/bot/bot.qc
qcsrc/server/cl_player.qc

diff --combined defaultXonotic.cfg
index fd4c100ceb2a164ad643eb2b9dbcbdba95490c8e,1c6942d0b5e393ab9b15902d5657d218a8a9e14e..725510d95f7a3610976aed0ceaa816cb0f4840c2
@@@ -1,5 -1,17 +1,5 @@@
  set g_xonoticversion 2.5svn   "Xonotic version (formatted for humans)"
  
 -//!<showbrand
 -showbrand 3
 -echo
 -echo A warning about this being a SVN development version was set up.
 -echo This build shall be used for development and testing only!
 -echo
 -echo If you want to disable this warning, add the line
 -echo   showbrand 0
 -echo to your autoexec.cfg.
 -echo
 -//!>showbrand
 -
  // changes a cvar and reports it to the server (for the menu to notify the
  // server about changes)
  alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
@@@ -240,28 -252,7 +240,28 @@@ cl_bobcycle 0 // how long the cycle of 
  cl_bob 0.01 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
  cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
  cl_leanmodel 1 // enables weapon leaning effect when looking around
 +cl_leanmodel_side_speed 0.7 "gun leaning sideways speed"
 +cl_leanmodel_side_limit 35 "gun leaning sideways limit"
 +cl_leanmodel_side_highpass1 30 "gun leaning sideways pre-highpass in 1/s"
 +cl_leanmodel_side_highpass 3 "gun leaning sideways highpass in 1/s"
 +cl_leanmodel_side_lowpass 20 "gun leaning sideways lowpass in 1/s"
 +cl_leanmodel_up_speed 0.65 "gun leaning upward speed"
 +cl_leanmodel_up_limit 50 "gun leaning upward limit"
 +cl_leanmodel_up_highpass1 5 "gun leaning upward pre-highpass in 1/s"
 +cl_leanmodel_up_highpass 15 "gun leaning upward highpass in 1/s"
 +cl_leanmodel_up_lowpass 20 "gun leaning upward lowpass in 1/s"
  cl_followmodel 1 // enables weapon pushing / pulling effect when walking
 +cl_followmodel_side_speed 0.25 "gun following sideways speed"
 +cl_followmodel_side_limit 6 "gun following sideways limit"
 +cl_followmodel_side_highpass1 30 "gun following sideways pre-highpass in 1/s"
 +cl_followmodel_side_highpass 5 "gun following sideways highpass in 1/s"
 +cl_followmodel_side_lowpass 10 "gun following sideways lowpass in 1/s"
 +cl_followmodel_up_speed 0.5 "gun following upward speed"
 +cl_followmodel_up_limit 5 "gun following upward limit"
 +cl_followmodel_up_highpass1 60 "gun following upward pre-highpass in 1/s"
 +cl_followmodel_up_highpass 2 "gun following upward highpass in 1/s"
 +cl_followmodel_up_lowpass 10 "gun following upward lowpass in 1/s"
 +
  cl_rollangle 0 // amount of view tilt when strafing, default is 2.0
  v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
  gl_polyblend 0.5 // whether to use screen tints, default is 1
@@@ -328,7 -319,7 +328,7 @@@ set g_telefrags 
  set g_telefrags_avoid 0
  set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
  
 -set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
 +set g_respawn_ghosts 0 "if 1 dead bodies become ghosts and float away when the player respawns"
  set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
  set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
  
@@@ -351,9 -342,9 +351,9 @@@ set sv_player_crouch_maxs "16 16 25" "m
  
  set sv_pogostick 1 "don't require releasing the space bar for jumping again"
  set sv_doublejump 0 "allow Quake 2-style double jumps"
 -set sv_jumpspeedcap_min "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
 -set sv_jumpspeedcap_max "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
 -set sv_jumpspeedcap_max_disable_on_ramps 0 "disable max jumpspeedcap on ramps to preserve the old rampjump style"
 +set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
 +set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
 +set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
  
  seta sv_precacheplayermodels 1
  seta sv_precacheweapons 0
@@@ -460,7 -451,7 +460,7 @@@ set bot_ai_aimskill_order_filter_5th 0.
  set g_waypointeditor 0
  set bot_ignore_bots 0 "When set, bots don't shoot at other bots"
  set bot_join_empty 0  "When set, bots also play if no player has joined the server"
- set bot_vs_human 0    "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count)"
+ set bot_vs_human 0    "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game"
  
  alias g_waypointeditor_spawn "impulse 103"
  alias g_waypointeditor_remove "impulse 104"
@@@ -1593,8 -1584,6 +1593,8 @@@ alias rankings "cmd rankings
  
  set g_ballistics_materialconstant 1414213562
  set g_ballistics_mindistance 16
 +set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls
 +set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls
  // unit: qJ / qu^3 (energy needed per volume unit of solid to push/burn away
  // parameter: bullet constant: mass / area in g/qu^2
  // = mass / (pi/4 * caliber^2)
@@@ -1772,7 -1761,7 +1772,7 @@@ seta cl_noantilag 0 "turn this on if yo
  
  set sv_pitch_min -35 "minimum aiming angle for shooting direction display of the gun"
  set sv_pitch_max  35 "maximum aiming angle for shooting direction display of the gun"
 -set sv_pitch_fixyaw 1 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0"
 +set sv_pitch_fixyaw 0 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0"
  
  set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
  
@@@ -1844,28 -1833,3 +1844,28 @@@ volume 
  
  // sucks less than the old one
  cl_decals_newsystem 1
 +
 +// NOTE: this only replaces weapons on the map
 +// use g_start_weapon_* to also replace the on-startup weapons!
 +// example: g_weaponreplace_nex "nex minstanex", then Nexes become MinstaNexes 50% of the times
 +// set the cvars to "0" to totally disable a weapon
 +set g_weaponreplace_laser ""
 +set g_weaponreplace_shotgun ""
 +set g_weaponreplace_uzi ""
 +set g_weaponreplace_grenadelauncher ""
 +set g_weaponreplace_electro ""
 +set g_weaponreplace_crylink ""
 +set g_weaponreplace_nex ""
 +set g_weaponreplace_hagar ""
 +set g_weaponreplace_rocketlauncher ""
 +set g_weaponreplace_porto ""
 +set g_weaponreplace_minstanex ""
 +set g_weaponreplace_hook ""
 +set g_weaponreplace_hlac ""
 +set g_weaponreplace_campingrifle ""
 +set g_weaponreplace_tuba ""
 +set g_weaponreplace_fireball ""
 +set g_weaponreplace_seeker ""
 +set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping uzi and shotgun (for Q3A map compatibility in mapinfo files)"
 +
 +set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
diff --combined qcsrc/server/bot/bot.qc
index 44ece52bfd9c66cd2caf0d67af3ce2c4c0256d4e,58dc1cf86d93e8fb344fcddd25b1342accf86e27..940782c8239d9538f474405d87d7b21f967dc447
@@@ -200,20 -200,6 +200,20 @@@ void bot_setnameandstuff(
        else
                name = bot_name;
  
 +      self.cleanname = strzone(name);
 +
 +      // number bots with identical names
 +      float i;
 +      i = 0;
 +      FOR_EACH_CLIENT(p)
 +      {
 +              if(clienttype(p) == CLIENTTYPE_BOT)
 +                      if(p.cleanname == name)
 +                              ++i;
 +      }
 +      if (i)
 +              name = strcat(name, "(", ftos(i), ")");
 +
        // pick the model and skin
        if(substring(bot_model, -4, 1) != ".")
                bot_model = strcat(bot_model, ".iqm");
@@@ -352,15 -338,12 +352,15 @@@ void bot_clientdisconnect(
  {
        if (clienttype(self) != CLIENTTYPE_BOT)
                return;
 +      if(self.cleanname)
 +              strunzone(self.cleanname);
        if(self.netname_freeme)
                strunzone(self.netname_freeme);
        if(self.playermodel_freeme)
                strunzone(self.playermodel_freeme);
        if(self.playerskin_freeme)
                strunzone(self.playerskin_freeme);
 +      self.cleanname = string_null;
        self.netname_freeme = string_null;
        self.playermodel_freeme = string_null;
        self.playerskin_freeme = string_null;
@@@ -544,7 -527,7 +544,7 @@@ void bot_serverframe(
  
        FOR_EACH_REALCLIENT(head)
        {
-               if(head.classname == "player" || g_lms || g_arena)
+               if(head.classname == "player" || g_lms || g_arena || g_ca)
                        ++activerealplayers;
                ++realplayers;
        }
index b3f0e3ee5aac7fd72f57ea2a4b9e3c5eb570519f,3a3a8a0d7ac9851cf7a3fcfa6644ec2873d7d7d3..3911ffecb89a5db3921992c8f729f91808f08dfa
@@@ -142,7 -142,6 +142,7 @@@ void CopyBody(float keepvelocity
        self.movetype = oldself.movetype;
        self.nextthink = oldself.nextthink;
        self.solid = oldself.solid;
 +      self.ballistics_density = oldself.ballistics_density;
        self.takedamage = oldself.takedamage;
        self.think = oldself.think;
        self.customizeentityforclient = oldself.customizeentityforclient;
@@@ -433,7 -432,7 +433,7 @@@ void PlayerDamage (entity inflictor, en
        else
                Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
  
-       if((g_arena && numspawned < 2) || (g_ca && player_cnt < 2) && !inWarmupStage)
+       if((g_arena && numspawned < 2) || (g_ca && player_cnt < required_ca_players) && !inWarmupStage)
                return;
  
        if (!g_minstagib)
                self.movetype = MOVETYPE_TOSS;
                // shootable corpse
                self.solid = SOLID_CORPSE;
 +              self.ballistics_density = cvar("g_ballistics_density_corpse");
                // don't stick to the floor
                self.flags &~= FL_ONGROUND;
                // dying animation