]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/serverlist
authorSamual Lenks <samual@xonotic.org>
Thu, 24 Oct 2013 18:11:06 +0000 (14:11 -0400)
committerSamual Lenks <samual@xonotic.org>
Thu, 24 Oct 2013 18:11:06 +0000 (14:11 -0400)
12 files changed:
defaultXonotic.cfg
qcsrc/client/progs.src
qcsrc/common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail [deleted file]
qcsrc/common/notifications.qh
qcsrc/common/util.qh
qcsrc/menu/progs.src
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/g_damage.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/progs.src

index 7ba487f6efb94f069e68532bc9721f045e4ab2f1..64a542c8636a336c59b6f204759ad841d374ff1e 100644 (file)
@@ -237,7 +237,7 @@ set g_maxplayers_spectator_blocktime 5      "if the players voted for the \"nospectat
 set g_warmup 0 "split the game into a warmup- and match-stage when set to 1"
 set g_warmup_limit 0   "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)"
 set g_warmup_allow_timeout 0   "if set to 1 timeouts can also be called in the warmup-stage, when sv_timeout is set to 1"
-set g_warmup_allguns 1 "if set players start with all guns in warmup mode"
+set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
 set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
 
 set g_chat_nospectators 0      "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
@@ -1436,7 +1436,7 @@ sv_cullentities_trace 1
 r_cullentities_trace 0
 
 // less "lagging" of other players, but also less PL tolerant... let's try this
-sv_clmovement_inputtimeout 0.07 // more than 2, less than 3 server frames
+sv_clmovement_inputtimeout 0.04 // more than 1, less than 2 server frames
 
 // exact gloss looks better, e.g. on g-23
 r_shadow_glossexact 1
index 114f0a5b5c77fdd666db5ae4953b653fa40302e5..fa61033f653b48f75947c6b95ea7a2e062ae8f0b 100644 (file)
@@ -121,5 +121,3 @@ tturrets.qc
 
 player_skeleton.qc
 ../common/animdecide.qc
-
-../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
diff --git a/qcsrc/common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail b/qcsrc/common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
deleted file mode 100644 (file)
index e69de29..0000000
index 0214ec3d6122c2e596ca84b8e8b8c92f524d2f6a..e8e92f01834cb4b83b588c8d83da8716ce6cfae0 100644 (file)
@@ -230,7 +230,7 @@ void Send_Notification_WOCOVA(
        MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
        MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
 #define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
-       MSG_ANNCE_NOTIF_##teams(default,prefix,channel,sound,volume,position) \
+       MULTITEAM_ANNCE##teams(default,prefix,channel,sound,volume,position)
 
 #define MSG_ANNCE_NOTIFICATIONS \
        MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT,       CH_INFO, "airshot",           VOL_BASEVOICE, ATTEN_NONE) \
index 10920c3a891cae60320606beac394656ee702626..effdb3cf7823ff8089ed0099a1808fd5e37e3e11 100644 (file)
@@ -6,6 +6,12 @@
 // a dummy macro that prevents the "hanging ;" warning
 #define ENDS_WITH_CURLY_BRACE
 
+#ifdef GMQCC
+# define ACCUMULATE_FUNCTION(func,otherfunc) \
+       [[accumulate]] void func() { otherfunc(); }
+# define CALL_ACCUMULATED_FUNCTION(func) \
+       func()
+#else
 #ifdef HAVE_YO_DAWG_CPP
 // TODO make ascii art pic of xzibit
 // YO DAWG!
@@ -41,6 +47,7 @@ void ACCUMULATE_call(string func)
 # define CALL_ACCUMULATED_FUNCTION(func) \
        ACCUMULATE_call(#func)
 #endif
+#endif
 
 // used for simplifying ACCUMULATE_FUNCTIONs
 #define SET_FIRST_OR_LAST(input,first,count) if(!input) { input = (first + count); }
index 3036278c1fcfbe09ed31da9f56795e2be7f8dbe6..4900b9d96bb52db193c8aaf82771634c94279755 100644 (file)
@@ -54,5 +54,3 @@ xonotic/util.qc
 ../common/urllib.qc
 
 ../warpzonelib/mathlib.qc
-
-../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
index f04fc8472288e11ae3b9c6e3da1a0c47e4ed6e82..53c1853a7faeeb056123eab23d3f3ab13f5812ca 100644 (file)
@@ -718,7 +718,7 @@ float CheatCommand(float argc)
        END_CHEAT_FUNCTION();
 }
 
-float Drag(entity e, float grab, float ischeat);
+float Drag(float force_allow_pick, float ischeat);
 void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
 void Drag_Finish(entity dragger);
 float Drag_IsDraggable(entity draggee);
@@ -748,40 +748,11 @@ float CheatFrame()
                        {
                                // use cheat dragging if cheats are enabled
                                crosshair_trace_plusvisibletriggers(self);
-                               Drag(trace_ent, TRUE, TRUE);
+                               Drag(TRUE, TRUE);
                        }
                        else
                        {
-                               // drag is TRUE if the object can be picked up. While an object is being carried, the Drag() function
-                               // must execute for it either way, otherwise it would cause bugs if it went out of the player's trace.
-                               // This also makes sure that an object can only pe picked up if in range, but does not get dropped if
-                               // it goes out of range while slinging it around.
-
-                               float drag;
-                               crosshair_trace_plusvisibletriggers(self);
-                               drag = FALSE;
-                               if(vlen(self.origin - trace_ent.origin) <= autocvar_g_grab_range)
-                               {
-                                       switch(trace_ent.grab)
-                                       {
-                                               case 0: // can't grab
-                                                       break;
-                                               case 1: // owner can grab
-                                                       if(trace_ent.owner == self || trace_ent.realowner == self)
-                                                               drag = TRUE;
-                                                       break;
-                                               case 2: // owner and team mates can grab
-                                                       if(SAME_TEAM(trace_ent.owner, self) || SAME_TEAM(trace_ent.realowner, self) || trace_ent.team == self.team)
-                                                               drag = TRUE;
-                                                       break;
-                                               case 3: // anyone can grab
-                                                       drag = TRUE;
-                                                       break;
-                                               default:
-                                                       break;
-                                       }
-                               }
-                               Drag(trace_ent, drag, FALSE); // execute dragging
+                               Drag(FALSE, FALSE); // execute dragging
                        }
                        break;
        }
@@ -795,7 +766,7 @@ float CheatFrame()
 
 // ENTITY DRAGGING
 
-float Drag(entity e, float pick, float ischeat)
+float Drag(float force_allow_pick, float ischeat)
 {
        BEGIN_CHEAT_FUNCTION();
 
@@ -840,9 +811,42 @@ float Drag(entity e, float pick, float ischeat)
                        else
                        {
                                if(Drag_CanDrag(self))
-                                       if(self.BUTTON_DRAG && pick)
+                                       if(self.BUTTON_DRAG)
                                        {
-                                               if(e)
+                                               crosshair_trace_plusvisibletriggers(self);
+                                               entity e = trace_ent;
+                                               float pick = force_allow_pick;
+                                               if (e && !pick)
+                                               {
+                                                       // pick is TRUE if the object can be picked up. While an object is being carried, the Drag() function
+                                                       // must execute for it either way, otherwise it would cause bugs if it went out of the player's trace.
+                                                       // This also makes sure that an object can only pe picked up if in range, but does not get dropped if
+                                                       // it goes out of range while slinging it around.
+
+                                                       if(vlen(self.origin - e.origin) <= autocvar_g_grab_range)
+                                                       {
+                                                               switch(e.grab)
+                                                               {
+                                                                       case 0: // can't grab
+                                                                               break;
+                                                                       case 1: // owner can grab
+                                                                               if(e.owner == self || e.realowner == self)
+                                                                                       pick = TRUE;
+                                                                               break;
+                                                                       case 2: // owner and team mates can grab
+                                                                               if(SAME_TEAM(e.owner, self) || SAME_TEAM(e.realowner, self) || e.team == self.team)
+                                                                                       pick = TRUE;
+                                                                               break;
+                                                                       case 3: // anyone can grab
+                                                                               pick = TRUE;
+                                                                               break;
+                                                                       default:
+                                                                               break;
+                                                               }
+                                                       }
+                                               }
+                                               // Find e and pick
+                                               if(e && pick)
                                                        if(Drag_IsDraggable(e))
                                                        {
                                                                if(ischeat)
index fac4314ca6e7b53c577b1182228f3ca612bc614e..1ab2b7ab512ea82d0b7368fdec781a2124d97a73 100644 (file)
@@ -439,7 +439,7 @@ void PutClientInServer (void)
                        self.ammo_fuel = warmup_start_ammo_fuel;
                        self.health = warmup_start_health;
                        self.armorvalue = warmup_start_armorvalue;
-                       self.weapons = warmup_start_weapons;
+                       self.weapons = WARMUP_START_WEAPONS;
                }
                else
                {
index 1c5daa19f1eb7999d4541a8f586c2de5332e9834..63924e60fe91acd5b0fc08f29ea31cec66c3b022 100644 (file)
@@ -353,7 +353,10 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                ear1 += v_right * -10;
                ear2 += v_right * +10;
                d = inflictor.origin - self.origin;
-               f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
+               if (d)
+                       f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
+               else
+                       f = 0;  // Assum ecenter.
                force = v_right * vlen(force);
                Violence_GibSplash_At(ear1, force * -1, 2, bound(0, damage, 25) / 2 * (0.5 - 0.5 * f), self, attacker);
                Violence_GibSplash_At(ear2, force,      2, bound(0, damage, 25) / 2 * (0.5 + 0.5 * f), self, attacker);
index c01cddd216a45bbdee98ba5c4c7e57767aaacd29..15b7a62bf2e0f0f9e53ffe673c6cd3c7436e42f1 100644 (file)
@@ -128,7 +128,7 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                        }
 
                        if(warmup_stage)
-                               GiveFrags_randomweapons.weapons = warmup_start_weapons;
+                               GiveFrags_randomweapons.weapons = WARMUP_START_WEAPONS;
                        else
                                GiveFrags_randomweapons.weapons = start_weapons;
 
index 0b5b42781229f0df535621e4b373a0e36302329a..91e922869ba4a69ca0117416853870b8ccbd4749 100644 (file)
@@ -615,6 +615,7 @@ float start_armorvalue;
 WepSet warmup_start_weapons;
 WepSet warmup_start_weapons_default;
 WepSet warmup_start_weapons_defaultmask;
+#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
 float warmup_start_ammo_shells;
 float warmup_start_ammo_nails;
 float warmup_start_ammo_rockets;
@@ -834,7 +835,7 @@ void readplayerstartcvars()
                        for (i = WEP_FIRST; i <= WEP_LAST; ++i)
                        {
                                e = get_weaponinfo(i);
-                               float w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
+                               float w = want_weapon("g_start_weapon_", e, g_warmup_allguns);
                                if(w & 1)
                                        warmup_start_weapons |= WepSet_FromWeapon(i);
                                if(w & 2)
@@ -858,10 +859,13 @@ void readplayerstartcvars()
                warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
        }
 
+       WepSet precache_weapons = start_weapons;
+       if (g_warmup_allguns != 1)
+               precache_weapons |= warmup_start_weapons;
        for (i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
                e = get_weaponinfo(i);
-               if((start_weapons | warmup_start_weapons) & WepSet_FromWeapon(i))
+               if(precache_weapons & WepSet_FromWeapon(i))
                        weapon_action(i, WR_PRECACHE);
        }
 
index e9e9a4b8c89e3fdfce2209e264df815a634b16d2..8980f77594776475103b94c0d69d624861512991 100644 (file)
@@ -269,5 +269,3 @@ mutators/mutator_campcheck.qc
 ../common/test.qc
 ../common/util.qc
 ../common/notifications.qc
-
-../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail