]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into samual/balance
authorSamual <samual@xonotic.org>
Sun, 18 Sep 2011 13:32:22 +0000 (09:32 -0400)
committerSamual <samual@xonotic.org>
Sun, 18 Sep 2011 13:32:22 +0000 (09:32 -0400)
config_update.cfg
defaultXonotic.cfg
qcsrc/client/tuba.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/defs.qh
qcsrc/server/g_hook.qc
qcsrc/server/g_world.qc
qcsrc/server/scores_rules.qc

index 4197bb34f09336b0ec94136358478eea21aaf147..a99803136122e0b31e9d280c09a2b9ef06f42822 100644 (file)
@@ -16,9 +16,12 @@ alias _update_configversion_4 "snd_entchannel0volume 1; snd_entchannel1volume 1;
 // fix for common broken config for unknown reason
 alias _update_configversion_5 "r_shadow_realtime_world_lightmaps 1; _update_configversion_6"
 
+// some people have freetype issues, weird
+alias _update_configversion_6 "r_font_disable_freetype 0; utf8_enable 1; _update_configversion_7"
+
 // place to put further updates
-alias _update_configversion_6 ""
+alias _update_configversion_7 ""
 
 _update_configversion_$g_configversion
 
-set g_configversion 6
+set g_configversion 7
index 759a512e7974b87b91ccdc678dcaefbf4f409dd4..9430c6ff6aae65308f984bb117d83d3c70d6d1d7 100644 (file)
@@ -1995,6 +1995,9 @@ set _origin "0 0 0"
 set _campaign_index ""
 set _campaign_name ""
 
+// debug
+set _independent_players 0 "DO NOT TOUCH"
+
 // define some engine cvars that we need even on dedicated server
 set r_showbboxes 0
 
index 06edec4da0e00a82982093323a63ee5f84546548..04114d324ab4b9c31590b9c9056bf15f9d71f790 100644 (file)
@@ -24,7 +24,11 @@ void Ent_TubaNote_UpdateSound()
 {
        self.enemy.cnt = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
        self.enemy.count = self.enemy.cnt;
+#ifdef PITCHSHIFT
+       sound7(self.enemy, CH_SHOTS_SINGLE, TUBA_STARTNOTE(0), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation, 100 * pow(2.0, self.cnt / 12.0), 0);
+#else
        sound(self.enemy, CH_SHOTS_SINGLE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation);
+#endif
 }
 
 void Ent_TubaNote_StopSound()
@@ -69,9 +73,13 @@ void Ent_TubaNote(float bIsNew)
 void Tuba_Precache()
 {
        float i;
+#ifdef PITCHSHIFT
+       precache_sound(TUBA_STARTNOTE(0));
+#else
        for(i = -18; i <= +27; ++i)
        {
                precache_sound(TUBA_STARTNOTE(i));
        }
+#endif
        //precache_sound(""); // we want to change volume of existing sounds
 }
index e920b5c3415613f35f336b36d90ded55fb2233ad..7b7a3fcef0e66ff00f44a5e2828ead66486fcb69 100644 (file)
@@ -1,3 +1,4 @@
+float autocvar__independent_players;
 float autocvar__campaign_index;
 string autocvar__campaign_name;
 float autocvar__sv_init;
index bbdb16cd2b71b89fcc607d10c95a791b222e32d9..ad9f3d185c57b7c18d50593f622cbf177c063a00 100644 (file)
@@ -367,6 +367,7 @@ void havocbot_bunnyhop(vector dir)
                self.bot_timelastseengoal = 0;
        }
 
+#if 0
        // Release jump button
        if(!cvar("sv_pogostick"))
        if(self.flags & FL_ONGROUND == 0)
@@ -392,6 +393,7 @@ void havocbot_bunnyhop(vector dir)
 
                }
        }
+#endif
 };
 
 void havocbot_movetogoal()
index 74494eed5dbc2d97de4f9bc2ff804ee0fd56a0cb..ef05663e5c58d5c2d4a01b2128acf036beb14642 100644 (file)
@@ -906,7 +906,7 @@ void PutClientInServer (void)
                if(clienttype(self) == CLIENTTYPE_BOT && autocvar_g_botclip_collisions)
                        self.dphitcontentsmask |= DPCONTENTS_BOTCLIP;
                self.frags = FRAGS_PLAYER;
-               if(independent_players)
+               if(INDEPENDENT_PLAYERS)
                        MAKE_INDEPENDENT_PLAYER(self);
                self.flags = FL_CLIENT;
                self.takedamage = DAMAGE_AIM;
@@ -1343,9 +1343,11 @@ void KillIndicator_Think()
        }
 }
 
+float clientkilltime;
 void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2 = spec
 {
        float killtime;
+       float starttime;
        entity e;
 
        if (gameover)
@@ -1381,13 +1383,16 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
                }
                else
                {
+                       starttime = max(time, clientkilltime);
+
                        self.killindicator = spawn();
                        self.killindicator.owner = self;
                        self.killindicator.scale = 0.5;
                        setattachment(self.killindicator, self, "");
                        setorigin(self.killindicator, '0 0 52');
                        self.killindicator.think = KillIndicator_Think;
-                       self.killindicator.nextthink = time + (self.lip) * 0.05;
+                       self.killindicator.nextthink = starttime + (self.lip) * 0.05;
+                       clientkilltime = max(clientkilltime, self.killindicator.nextthink + 0.05);
                        self.killindicator.cnt = ceil(killtime);
                        self.killindicator.count = bound(0, ceil(killtime), 10);
                        //sprint(self, strcat("^1You'll be dead in ", ftos(self.killindicator.cnt), " seconds\n"));
@@ -1402,7 +1407,8 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
                                setattachment(e.killindicator, e, "");
                                setorigin(e.killindicator, '0 0 52');
                                e.killindicator.think = KillIndicator_Think;
-                               e.killindicator.nextthink = time + (e.lip) * 0.05;
+                               e.killindicator.nextthink = starttime + (e.lip) * 0.05;
+                               clientkilltime = max(clientkilltime, e.killindicator.nextthink + 0.05);
                                e.killindicator.cnt = ceil(killtime);
                        }
                        self.lip = 0;
index afe3088d431cd40507f61ce543442da20f80fa8c..fe678961848c54692bfc3e51250402b155cca1be 100644 (file)
@@ -412,7 +412,8 @@ void W_WeaponFrame()
                c = c + 1;
                if(wb && ((self.weapons & wb) == 0))
                {
-                       W_SwitchWeapon_Force(self, w_getbestweapon(self));
+                       if(self.weapon == self.switchweapon)
+                               W_SwitchWeapon_Force(self, w_getbestweapon(self));
                        wb = 0;
                }
 
index 7dd3a5aed03e8f478d52940a17c0ee8f18f62634..01966039c7e4a5d96742cb0a0ad0c8ab2770c620 100644 (file)
@@ -496,6 +496,7 @@ float GetPlayerSoundSampleField_notFound;
 .float version_mismatch;
 
 float independent_players;
+#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
 #define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
 #define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER) + ((e).frags = FRAGS_PLAYER_NONSOLID))
 // we're using + here instead of , because fteqcc sucks
index bd5b2c328d01a8ae6ca748d578f700a59489b1e2..76faad923281b026a45773f292bfc91854f78789 100644 (file)
@@ -62,6 +62,14 @@ void RemoveGrapplingHook(entity pl)
        //pl.disableclientprediction = FALSE;
 }
 
+void GrapplingHookReset(void)
+{
+       if(self.realowner.hook == self)
+               RemoveGrapplingHook(self.owner);
+       else // in any case:
+               remove(self);
+}
+
 void GrapplingHookThink();
 void GrapplingHook_Stop()
 {
@@ -311,6 +319,7 @@ void FireGrapplingHook (void)
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
        self.hook = missile;
+       missile.reset = GrapplingHookReset;
        missile.classname = "grapplinghook";
 
        missile.movetype = MOVETYPE_FLY;
index b9552673e889107ad89f7ec5eea76f9124427d2c..09daa245ac8c368016acb84ede41df05764c8f86 100644 (file)
@@ -406,6 +406,7 @@ void cvar_changes_init()
                BADCVAR("bot_number");
                BADCVAR("bot_prefix");
                BADCVAR("bot_suffix");
+               BADCVAR("bot_config_file");
                BADCVAR("capturelimit_override");
                BADCVAR("fraglimit_override");
                BADCVAR("gametype");
index 030a26d9cb8857f922fec1cc382ef14e81d6a29d..eb7205e9c3859bf5d3c2977d8bde069bd31993d7 100644 (file)
@@ -17,12 +17,12 @@ void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabl
        if(score_enabled)
                ScoreInfo_SetLabel_TeamScore  (ST_SCORE,        "score",     stprio);
 
-       if not(independent_players)
+       if not(INDEPENDENT_PLAYERS)
                ScoreInfo_SetLabel_PlayerScore(SP_KILLS,        "kills",     0);
 
        ScoreInfo_SetLabel_PlayerScore(SP_DEATHS,       "deaths",    SFL_LOWER_IS_BETTER);
 
-       if not(independent_players)
+       if not(INDEPENDENT_PLAYERS)
                ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES,     "suicides",  SFL_LOWER_IS_BETTER);
 
        if(score_enabled)