]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into martin-t/msnt
authorMartin Taibr <taibr.martin@gmail.com>
Fri, 7 Oct 2016 20:04:28 +0000 (22:04 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Fri, 7 Oct 2016 20:04:28 +0000 (22:04 +0200)
42 files changed:
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-overkill.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
balance-overkill.cfg
notifications.cfg
qcsrc/client/hud/panel/centerprint.qc
qcsrc/common/ent_cs.qc
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/minigames/minigame/snake.qc
qcsrc/common/minigames/minigame/ttt.qc
qcsrc/common/monsters/sv_spawn.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/nix/sv_nix.qc
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/common/t_items.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/lib/random.qc
qcsrc/lib/random.qh
qcsrc/server/bot/default/bot.qc
qcsrc/server/cheats.qc
qcsrc/server/command/common.qc
qcsrc/server/g_world.qc
qcsrc/server/mapvoting.qc
qcsrc/server/mutators/mutator/gamemode_invasion.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/teamplay.qc

index 1470c3326bc1783f662b95e6aeb127771491b04a..f0aeead9319085324659f8b64d545158dfe9b8b3 100644 (file)
@@ -397,10 +397,11 @@ set g_balance_devastator_reload_ammo 0
 set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
-set g_balance_devastator_remote_force 450
+set g_balance_devastator_remote_force 300
 set g_balance_devastator_remote_jump_damage 70
-set g_balance_devastator_remote_jump_radius 0
-set g_balance_devastator_remote_jump_velocity_z_add 400
+set g_balance_devastator_remote_jump_force 450
+set g_balance_devastator_remote_jump_radius 100
+set g_balance_devastator_remote_jump_velocity_z_add 0
 set g_balance_devastator_remote_jump_velocity_z_max 1500
 set g_balance_devastator_remote_jump_velocity_z_min 400
 set g_balance_devastator_remote_radius 110
index d4b47594d7061462769246cb79af1a180c4b84d1..41c9081b92d80a0df3b7252dbf1a65fa7c385e83 100644 (file)
@@ -399,6 +399,7 @@ set g_balance_devastator_remote_damage 105
 set g_balance_devastator_remote_edgedamage 40
 set g_balance_devastator_remote_force 600
 set g_balance_devastator_remote_jump_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index d7463338aa0f2746550ab2c40468fa8838e89e7a..82609a76ca5ed4158e0c210b839025792de15e96 100644 (file)
@@ -84,7 +84,7 @@ set g_balance_machinegun_reload_time 1.5
 set g_balance_machinegun_solidpenetration 13.1
 set g_balance_machinegun_spread_add 0.012
 set g_balance_machinegun_spread_max 0.05
-set g_balance_machinegun_spread_min 0.02
+set g_balance_machinegun_spread_min 0
 set g_balance_machinegun_sustained_ammo 1
 set g_balance_machinegun_sustained_damage 25
 set g_balance_machinegun_sustained_force 5
@@ -302,7 +302,7 @@ set g_balance_vortex_charge_shot_multiplier 0
 set g_balance_vortex_charge_start 0.5
 set g_balance_vortex_charge_velocity_rate 0
 set g_balance_vortex_primary_ammo 10
-set g_balance_vortex_primary_animtime 0.95
+set g_balance_vortex_primary_animtime 0.65
 set g_balance_vortex_primary_damage 100
 set g_balance_vortex_primary_damagefalloff_forcehalflife 0
 set g_balance_vortex_primary_damagefalloff_halflife 0
@@ -325,8 +325,8 @@ set g_balance_vortex_secondary_damagefalloff_maxdist 0
 set g_balance_vortex_secondary_damagefalloff_mindist 0
 set g_balance_vortex_secondary_force 0
 set g_balance_vortex_secondary_refire 0
-set g_balance_vortex_switchdelay_drop 0.25
-set g_balance_vortex_switchdelay_raise 0.25
+set g_balance_vortex_switchdelay_drop 0.2
+set g_balance_vortex_switchdelay_raise 0.2
 set g_balance_vortex_weaponreplace ""
 set g_balance_vortex_weaponstart 0
 set g_balance_vortex_weaponstartoverride -1
@@ -399,6 +399,7 @@ set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
 set g_balance_devastator_remote_jump_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
@@ -777,15 +778,15 @@ set g_balance_arc_weaponthrowable 1
 // }}}
 // {{{ #21: Heavy Machine Gun
 set g_balance_hmg_ammo 1
-set g_balance_hmg_damage 10
-set g_balance_hmg_force 5
+set g_balance_hmg_damage 30
+set g_balance_hmg_force 10
 set g_balance_hmg_refire 0.05
 set g_balance_hmg_reload_ammo 120
 set g_balance_hmg_reload_time 1
 set g_balance_hmg_solidpenetration 32
-set g_balance_hmg_spread_add 0.01
-set g_balance_hmg_spread_max 0.05
-set g_balance_hmg_spread_min 0.02
+set g_balance_hmg_spread_add 0.005
+set g_balance_hmg_spread_max 0.06
+set g_balance_hmg_spread_min 0.01
 set g_balance_hmg_switchdelay_drop 0.2
 set g_balance_hmg_switchdelay_raise 0.2
 set g_balance_hmg_weaponreplace ""
index fe3b9ed8711e62bb64ba564310ae573008677f6c..99edec78b8da1c543470adffdd3a155e967f6a5a 100644 (file)
@@ -465,6 +465,7 @@ set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 400
 set g_balance_devastator_remote_jump_damage 40
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 200
 set g_balance_devastator_remote_jump_velocity_z_add 500
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index c9bdb2aa367e5b11629c5778825d3c895e4f0539..95ac919b6a9e5d3c5d74e4a92771d47d1c9a5768 100644 (file)
@@ -399,6 +399,7 @@ set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 350
 set g_balance_devastator_remote_jump_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 64d79e150aee00e1e9abfbb90d420edede443993..87a00b110cce40ae96ac534b42f640ddf8954d36 100644 (file)
@@ -325,8 +325,8 @@ set g_balance_vortex_secondary_damagefalloff_maxdist 0
 set g_balance_vortex_secondary_damagefalloff_mindist 0
 set g_balance_vortex_secondary_force 0
 set g_balance_vortex_secondary_refire 0
-set g_balance_vortex_switchdelay_drop 0.25
-set g_balance_vortex_switchdelay_raise 0.25
+set g_balance_vortex_switchdelay_drop 0.2
+set g_balance_vortex_switchdelay_raise 0.2
 set g_balance_vortex_weaponreplace ""
 set g_balance_vortex_weaponstart 0
 set g_balance_vortex_weaponstartoverride -1
@@ -399,6 +399,7 @@ set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
 set g_balance_devastator_remote_jump_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 64d79e150aee00e1e9abfbb90d420edede443993..87a00b110cce40ae96ac534b42f640ddf8954d36 100644 (file)
@@ -325,8 +325,8 @@ set g_balance_vortex_secondary_damagefalloff_maxdist 0
 set g_balance_vortex_secondary_damagefalloff_mindist 0
 set g_balance_vortex_secondary_force 0
 set g_balance_vortex_secondary_refire 0
-set g_balance_vortex_switchdelay_drop 0.25
-set g_balance_vortex_switchdelay_raise 0.25
+set g_balance_vortex_switchdelay_drop 0.2
+set g_balance_vortex_switchdelay_raise 0.2
 set g_balance_vortex_weaponreplace ""
 set g_balance_vortex_weaponstart 0
 set g_balance_vortex_weaponstartoverride -1
@@ -399,6 +399,7 @@ set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
 set g_balance_devastator_remote_jump_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 7571001c67d01b143ab62216856087ff4b304a98..c55241962ba5817ff3d0e4df00fb09a3d023ece6 100644 (file)
@@ -65,15 +65,15 @@ set g_pickup_fuel_jetpack 100
 set g_pickup_fuel_max 100
 set g_pickup_armorsmall 5
 set g_pickup_armorsmall_max 20
-set g_pickup_armorsmall_anyway 0
+set g_pickup_armorsmall_anyway 1
 set g_pickup_armormedium 25
-set g_pickup_armormedium_max 200
+set g_pickup_armormedium_max 100
 set g_pickup_armormedium_anyway 1
 set g_pickup_armorbig 50
-set g_pickup_armorbig_max 200
+set g_pickup_armorbig_max 100
 set g_pickup_armorbig_anyway 1
 set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 200
+set g_pickup_armorlarge_max 100
 set g_pickup_armorlarge_anyway 1
 set g_pickup_healthsmall 5
 set g_pickup_healthsmall_max 200
@@ -119,12 +119,12 @@ set g_balance_armor_regen 0
 set g_balance_armor_regenlinear 0
 set g_balance_armor_rot 0
 set g_balance_armor_rotlinear 1
-set g_balance_pause_armor_rot 1
+set g_balance_pause_armor_rot 5
 set g_balance_pause_armor_rot_spawn 5
 set g_balance_armor_regenstable 100
 set g_balance_armor_rotstable 0
 set g_balance_armor_limit 999
-set g_balance_armor_blockpercent 0.7
+set g_balance_armor_blockpercent 0.6
 set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
 set g_balance_fuel_regenlinear 0
 set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
index 6aa1ee3b7d37fc66b0dee4979e396acd7025d1f2..8583592b9acb74d11d24b8125b9b9caac23f0177 100644 (file)
@@ -102,7 +102,7 @@ seta notification_ANNCE_VOTE_ACCEPT "2" "0 = disabled, 1 = enabled if gentle mod
 seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
 seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
 
-// MSG_INFO notifications (count = 316):
+// MSG_INFO notifications (count = 320):
 seta notification_INFO_CA_JOIN_LATE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CA_LEAVE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -311,6 +311,10 @@ seta notification_INFO_LMS_FORFEIT "1" "0 = off, 1 = print to console, 2 = print
 seta notification_INFO_LMS_NOLIVES "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_MINIGAME_INVITE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_MONSTERS_DISABLED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_NEXBALL_RETURN_HELD_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_NEXBALL_RETURN_HELD_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_NEXBALL_RETURN_HELD_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_NEXBALL_RETURN_HELD_YELLOW "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_ONSLAUGHT_CAPTURE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_ONSLAUGHT_CPDESTROYED_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_ONSLAUGHT_CPDESTROYED_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -882,4 +886,4 @@ seta notification_show_sprees_info "3" "Show spree information in MSG_INFO messa
 seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
 seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
 
-// Notification counts (total = 816): MSG_ANNCE = 89, MSG_INFO = 316, MSG_CENTER = 230, MSG_MULTI = 153, MSG_CHOICE = 28
+// Notification counts (total = 820): MSG_ANNCE = 89, MSG_INFO = 320, MSG_CENTER = 230, MSG_MULTI = 153, MSG_CHOICE = 28
index 5b80690101b089e0e2cd15df07d40aa05bb9356a..f67cbffbd04d176160d072b1e6bddcbfe3e045b0 100644 (file)
@@ -1,6 +1,7 @@
 #include "centerprint.qh"
 
 #include "scoreboard.qh"
+#include <common/notifications/all.qh>
 
 // CenterPrint (#16)
 
@@ -246,6 +247,9 @@ void HUD_CenterPrint ()
                else // Expiring soon, so fade it out.
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
 
+               if(centerprint_msgID[j] == CPID_TIMEIN)
+                       a = 1;
+
                // while counting down show it anyway in order to hold the current message position
                if (a <= 0.5/255.0 && centerprint_countdown_num[j] == 0)  // Guaranteed invisible - don't show.
                        continue;
index 17ee08e7cf14937037696112f4a7edf941c2ab4e..a89e84a03725d7f8ff16525ef81faa52e9d81d49 100644 (file)
@@ -11,43 +11,43 @@ MACRO_END
 MACRO_END
 
 // #define PROP(public, fld, set, sv, cl)
-#define ENTCS_NETPROPS(PROP) PROP(false, sv_entnum, ENTCS_SET_NORMAL, {}, {}) /* sentinel */ \
+#define ENTCS_NETPROPS(ent, PROP) PROP(false, sv_entnum, ENTCS_SET_NORMAL, {}, {}) /* sentinel */ \
        PROP(false, origin, ENTCS_SET_NORMAL, \
-       { WriteShort(chan, this.origin.x);  WriteShort(chan, this.origin.y); \
-         WriteShort(chan, this.origin.z); }, \
-       { this.has_sv_origin = true; vector v; v.x = ReadShort(); v.y = ReadShort(); v.z = ReadShort(); setorigin(this, v); }) \
+       { WriteShort(chan, ent.origin.x);  WriteShort(chan, ent.origin.y); \
+         WriteShort(chan, ent.origin.z); }, \
+       { ent.has_sv_origin = true; vector v; v.x = ReadShort(); v.y = ReadShort(); v.z = ReadShort(); setorigin(ent, v); }) \
     \
        PROP(false, angles_y, ENTCS_SET_NORMAL, \
-       { WriteByte(chan, this.angles.y / 360 * 256); }, \
-       { vector v = '0 0 0'; v.y = ReadByte() / 256 * 360; this.angles = v; }) \
+       { WriteByte(chan, ent.angles.y / 360 * 256); }, \
+       { vector v = '0 0 0'; v.y = ReadByte() / 256 * 360; ent.angles = v; }) \
     \
        PROP(false, health, ENTCS_SET_NORMAL, \
-       { WriteByte(chan, bound(0, this.health / 10, 255));  /* FIXME: use a better scale? */ }, \
-       { this.healthvalue = ReadByte() * 10; }) \
+       { WriteByte(chan, bound(0, ent.health / 10, 255));  /* FIXME: use a better scale? */ }, \
+       { ent.healthvalue = ReadByte() * 10; }) \
     \
        PROP(false, armorvalue, ENTCS_SET_NORMAL, \
-       { WriteByte(chan, bound(0, this.armorvalue / 10, 255));  /* FIXME: use a better scale? */ }, \
-       { this.armorvalue = ReadByte() * 10; }) \
+       { WriteByte(chan, bound(0, ent.armorvalue / 10, 255));  /* FIXME: use a better scale? */ }, \
+       { ent.armorvalue = ReadByte() * 10; }) \
     \
        PROP(true, netname, ENTCS_SET_MUTABLE_STRING, \
-       { WriteString(chan, this.netname); }, \
-       { if (this.netname) strunzone(this.netname); this.netname = strzone(ReadString()); }) \
+       { WriteString(chan, ent.netname); }, \
+       { if (ent.netname) strunzone(ent.netname); ent.netname = strzone(ReadString()); }) \
     \
        PROP(true, model, ENTCS_SET_NORMAL, \
-       { WriteString(chan, this.model); }, \
-       { if (this.model) strunzone(this.model); this.model = strzone(ReadString()); }) \
+       { WriteString(chan, ent.model); }, \
+       { if (ent.model) strunzone(ent.model); ent.model = strzone(ReadString()); }) \
     \
        PROP(true, skin, ENTCS_SET_NORMAL, \
-       { WriteByte(chan, this.skin); }, \
-       { this.skin = ReadByte(); }) \
+       { WriteByte(chan, ent.skin); }, \
+       { ent.skin = ReadByte(); }) \
     \
     PROP(true, clientcolors, ENTCS_SET_NORMAL, \
-       { WriteByte(chan, this.clientcolors); }, \
-       { this.colormap = ReadByte(); }) \
+       { WriteByte(chan, ent.clientcolors); }, \
+       { ent.colormap = ReadByte(); }) \
     \
     PROP(true, frags, ENTCS_SET_NORMAL, \
-       { WriteShort(chan, this.frags); }, \
-       { this.frags = ReadShort(); }) \
+       { WriteShort(chan, ent.frags); }, \
+       { ent.frags = ReadShort(); }) \
     \
        /**/
 
@@ -63,7 +63,7 @@ MACRO_END
                        } \
                        i += 1; \
                }
-               ENTCS_NETPROPS(X);
+               ENTCS_NETPROPS(this, X);
        #undef X
                if (i >= BITS(16 - 1)) LOG_FATAL("Exceeded ENTCS_NETPROPS limit");
        }
@@ -93,7 +93,7 @@ MACRO_END
                        } \
                        i += 1; \
                }
-               ENTCS_NETPROPS(X);
+               ENTCS_NETPROPS(this, X);
        #undef X
                return true;
        }
@@ -115,7 +115,7 @@ MACRO_END
                        } \
                        i += 1; \
                }
-               ENTCS_NETPROPS(X);
+               ENTCS_NETPROPS(this, X);
        #undef X
            setorigin(this, this.origin);  // relink
        }
@@ -214,7 +214,7 @@ MACRO_END
                        } \
                        i += 1; \
                }
-               ENTCS_NETPROPS(X);
+               ENTCS_NETPROPS(e, X);
        #undef X
                e.iflags |= IFLAG_ORIGIN;
                InterpolateOrigin_Note(e);
index 1d2555e95e9c9750dd5ef146f2356bad7bf40286..163d7b81cbda375b689661b62b3e7498ad77bd65 100644 (file)
@@ -103,9 +103,9 @@ void nexball_setstatus(entity this)
        {
                if(this.ballcarried.teamtime && (this.ballcarried.teamtime < time))
                {
-                       bprint("The ", Team_ColoredFullName(this.team), " held the ball for too long.\n");
-                       DropBall(this.ballcarried, this.ballcarried.owner.origin, '0 0 0');
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_NEXBALL_RETURN_HELD));
                        entity e = this.ballcarried;
+                       DropBall(this.ballcarried, this.ballcarried.owner.origin, '0 0 0');
                        ResetBall(e);
                }
                else
@@ -255,7 +255,7 @@ void ResetBall(entity this)
        if(this.cnt < 2)        // step 1
        {
                if(time == this.teamtime)
-                       bprint("The ", Team_ColoredFullName(this.team), " held the ball for too long.\n");
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_NEXBALL_RETURN_HELD));
 
                settouch(this, func_null);
                set_movetype(this, MOVETYPE_NOCLIP);
index d6606a370b74e6cc08fdd9a898e2f6a5a12d5766..a18ce34c5d06e83ad98d95a2e606f0034b5bc333 100644 (file)
@@ -1685,7 +1685,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                {
                        if(SAME_TEAM(tmp_entity, player))
                        if(random_target)
-                               RandomSelection_Add(tmp_entity, 0, string_null, 1, 1);
+                               RandomSelection_AddEnt(tmp_entity, 1, 1);
                        else if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == NULL)
                                closest_target = tmp_entity;
                }
@@ -1732,7 +1732,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                for(tmp_entity = ons_worldgeneratorlist; tmp_entity; tmp_entity = tmp_entity.ons_worldgeneratornext)
                {
                        if(random_target)
-                               RandomSelection_Add(tmp_entity, 0, string_null, 1, 1);
+                               RandomSelection_AddEnt(tmp_entity, 1, 1);
                        else
                        {
                                if(SAME_TEAM(tmp_entity, player))
index c15ecd463b94f4e8da29e7e745fd5bc87fef3de7..7f0fdb2ff750aa61eb1ffd2b5d72c903cfd0d97a 100644 (file)
@@ -95,7 +95,7 @@ void snake_new_mouse(entity minigame)
        {
                string pos = minigame_tile_buildname(i, j);
                if(!snake_find_piece(minigame, pos))
-                       RandomSelection_Add(NULL, 0, pos, 1, 1);
+                       RandomSelection_AddString(pos, 1, 1);
        }
 
        entity piece = msle_spawn(minigame,"minigame_board_piece");
@@ -175,7 +175,7 @@ void minigame_setup_snake(entity minigame, int pteam)
        {
                string pos = minigame_tile_buildname(i, j);
                if(!snake_find_piece(minigame, pos))
-                       RandomSelection_Add(NULL, 0, pos, 1, 1);
+                       RandomSelection_AddString(pos, 1, 1);
        }
 
        entity piece = msle_spawn(minigame,"minigame_board_piece");
index e06bb46628c5366db60f07a129feaf0cc18358f7..c5a658054fe0d1e55192363b7e12cfd0abe9112b 100644 (file)
@@ -418,7 +418,7 @@ int ttt_ai_random(int piecemask)
        for ( int i = 0; i < 9; i++ )
        {
                if ( piecemask & f )
-                       RandomSelection_Add(NULL, f, string_null, 1, 1);
+                       RandomSelection_AddFloat(f, 1, 1);
                f <<= 1;
        }
 
index da924cf96b37ec7e8ba707f40f1e1a79c88d156a..9e87e488e624323d336ee9cfcedb36ec651b1ba9 100644 (file)
@@ -24,7 +24,7 @@ entity spawnmonster (string monster, int monster_id, entity spawnedby, entity ow
                RandomSelection_Init(); 
                FOREACH(Monsters, it != MON_Null,
                {
-                       RandomSelection_Add(it, 0, string_null, 1, 1);
+                       RandomSelection_AddEnt(it, 1, 1);
                });
 
                monster_id = RandomSelection_chosen_ent.monsterid;
index 82fa2d33cb8bd0e0a649619e7836f95eefdfd9d6..5587da593796e32e6e6afee3d91d84ec4ac14a18 100644 (file)
@@ -216,7 +216,7 @@ void buff_NewType(entity ent, float cb)
        FOREACH(Buffs, buff_Available(it), LAMBDA(
                it.buff_seencount += 1;
                // if it's already been chosen, give it a lower priority
-               RandomSelection_Add(NULL, it.m_itemid, string_null, 1, max(0.2, 1 / it.buff_seencount));
+               RandomSelection_AddFloat(it.m_itemid, 1, max(0.2, 1 / it.buff_seencount));
        ));
        ent.buffs = RandomSelection_chosen_float;
 }
index e07034bafa33c7d775d3a3e0cb134beb9edb1241..a8347499841b77d034adb39efac4853400343f29 100644 (file)
@@ -1,8 +1,8 @@
 #include "sv_melee_only.qh"
 
-REGISTER_MUTATOR(melee_only, cvar("g_melee_only") && !cvar("g_instagib") && !g_nexball);
+REGISTER_MUTATOR(melee_only, cvar("g_melee_only") && !cvar("g_instagib") && !cvar("g_overkill") && !g_nexball);
 
-MUTATOR_HOOKFUNCTION(melee_only, SetStartItems)
+MUTATOR_HOOKFUNCTION(melee_only, SetStartItems, CBC_ORDER_LAST)
 {
        start_ammo_shells = warmup_start_ammo_shells = 0;
        start_weapons = warmup_start_weapons = WEPSET(SHOTGUN);
index 02760045c3e89e68bd8f309ad80a3fba7fd7ca8c..b0c0e582aaa5aab136865d7805bc6a6001d0e1ec 100644 (file)
@@ -211,7 +211,7 @@ void napalm_damage(entity this, float dist, float damage, float edgedamage, floa
                        if(d < dist)
                        {
                                e.fireball_impactvec = p;
-                               RandomSelection_Add(e, 0, string_null, 1 / (1 + d), !Fire_IsBurning(e));
+                               RandomSelection_AddEnt(e, 1 / (1 + d), !Fire_IsBurning(e));
                        }
                }
        if(RandomSelection_chosen_ent)
index 97ed4361ba12c8e4da5d8701fbf7f7e3208faad7..39072cefc7d2ba0ab9697a9f3a104599b2a40dc9 100644 (file)
@@ -96,7 +96,7 @@ void NIX_ChooseNextWeapon()
        RandomSelection_Init();
        FOREACH(Weapons, it != WEP_Null, LAMBDA(
                if(NIX_CanChooseWeapon(it.m_id))
-                       RandomSelection_Add(NULL, it.m_id, string_null, 1, (it.m_id != nix_weapon));
+                       RandomSelection_AddFloat(it.m_id, 1, (it.m_id != nix_weapon));
        ));
        nix_nextweapon = RandomSelection_chosen_float;
 }
index ea7ed953ce45aa86ed3193740c8c3cf0edb968a0..f86c71b7eb694d0cf0032165fe3b5fc114b2dcf0 100644 (file)
@@ -21,8 +21,6 @@ float autocvar_g_overkill_ammo_charge_limit;
 .float ok_use_ammocharge = _STAT(OK_AMMO_CHARGE);
 .float ok_ammo_charge = _STAT(OK_AMMO_CHARGEPOOL);
 
-.float ok_pauseregen_finished;
-
 void(entity ent, float wep) ok_DecreaseCharge;
 
 void ok_Initialize();
@@ -109,22 +107,13 @@ MUTATOR_HOOKFUNCTION(ok, PlayerDamage_Calculate, CBC_ORDER_LAST)
                if(!IS_DEAD(frag_target))
                {
                        Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);
-                       M_ARGV(6, vector) = '0 0 0';
+                       M_ARGV(6, vector) = '0 0 0'; // force
                }
 
-               M_ARGV(4, float) = 0;
+               M_ARGV(4, float) = 0; // damage
        }
 }
 
-MUTATOR_HOOKFUNCTION(ok, PlayerDamage_SplitHealthArmor)
-{
-       entity frag_target = M_ARGV(2, entity);
-       float damage_take = M_ARGV(4, float);
-
-       if(damage_take)
-               frag_target.ok_pauseregen_finished = max(frag_target.ok_pauseregen_finished, time + 2);
-}
-
 void ok_DropItem(entity this, entity targ)
 {
        entity e = new(droppedweapon); // hax
@@ -168,30 +157,6 @@ MUTATOR_HOOKFUNCTION(ok, MonsterDropItem)
        ok_DropItem(mon, frag_attacker);
 }
 
-MUTATOR_HOOKFUNCTION(ok, PlayerRegen)
-{
-       entity player = M_ARGV(0, entity);
-
-       // overkill's values are different, so use custom regen
-       if(!STAT(FROZEN, player))
-       {
-               player.armorvalue = CalcRotRegen(player.armorvalue, autocvar_g_balance_armor_regenstable, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear,
-                       1 * frametime * (time > player.ok_pauseregen_finished), 0, 0, 1, 1 * frametime * (time > player.pauserotarmor_finished), autocvar_g_balance_armor_limit);
-               player.health = CalcRotRegen(player.health, autocvar_g_balance_health_regenstable, 0, 100, 1 * frametime * (time > player.ok_pauseregen_finished), 200, 0,
-                       autocvar_g_balance_health_rotlinear, 1 * frametime * (time > player.pauserothealth_finished), autocvar_g_balance_health_limit);
-
-               float minf, maxf, limitf;
-
-               maxf = autocvar_g_balance_fuel_rotstable;
-               minf = autocvar_g_balance_fuel_regenstable;
-               limitf = autocvar_g_balance_fuel_limit;
-
-               player.ammo_fuel = CalcRotRegen(player.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear,
-                       frametime * (time > player.pauseregen_finished) * ((player.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > player.pauserotfuel_finished), limitf);
-       }
-       return true; // return true anyway, as frozen uses no regen
-}
-
 MUTATOR_HOOKFUNCTION(ok, ForbidThrowCurrentWeapon)
 {
        return true;
@@ -221,7 +186,8 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
        ok_IncreaseCharge(player, PS(player).m_weapon.m_id);
 
        if(PHYS_INPUT_BUTTON_ATCK2(player))
-       if(!forbidWeaponUse(player) || player.weapon_blocked) // allow if weapon is blocked
+       if( !forbidWeaponUse(player) || player.weapon_blocked // allow if weapon is blocked
+               || (round_handler_IsActive() && !round_handler_IsRoundStarted()) )
        if(time >= player.jump_interval)
        {
                player.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor(player);
@@ -287,8 +253,6 @@ MUTATOR_HOOKFUNCTION(ok, PlayerSpawn)
        // if player changed their weapon while dead, don't switch to their death weapon
        if(player.impulse)
                player.ok_lastwep = 0;
-
-       player.ok_pauseregen_finished = time + 2;
 }
 
 void self_spawnfunc_weapon_hmg(entity this) { spawnfunc_weapon_hmg(this); }
@@ -362,7 +326,7 @@ MUTATOR_HOOKFUNCTION(ok, SpectateCopy)
        client.ok_use_ammocharge = spectatee.ok_use_ammocharge;
 }
 
-MUTATOR_HOOKFUNCTION(ok, SetStartItems)
+MUTATOR_HOOKFUNCTION(ok, SetStartItems, CBC_ORDER_LAST)
 {
        WepSet ok_start_items = (WEPSET(MACHINEGUN) | WEPSET(VORTEX) | WEPSET(SHOTGUN));
 
index 26a6c509b1953003342ba7107ceb369d3a116582..2e4802d3883f8510704e946673972f8fd558a636 100644 (file)
@@ -38,7 +38,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
                        continue;
                if(!checkpvs(spawn_spot.origin, it))
                        continue;
-               RandomSelection_Add(it, 0, string_null, 1, 1);
+               RandomSelection_AddEnt(it, 1, 1);
        ));
 
        if(RandomSelection_chosen_ent)
index e6be6b1007c30ce0a6de83607c674ac98b9d9dc9..a6431cf673810c1625552fc2418c644738c3e8ad 100644 (file)
 
     MSG_INFO_NOTIF(MONSTERS_DISABLED,                       1,  0, 0, "", "",           "",     _("^BGMonsters are currently disabled"), "")
 
+    MULTITEAM_INFO(NEXBALL_RETURN_HELD, 4,                  1,  0, 0, "", "",           "",     _("^BGThe ^TC^TT^BG team held the ball for too long"), "", NAME)
+
     MSG_INFO_NOTIF(ONSLAUGHT_CAPTURE,                       1,  2, 0, "s1 s2", "",      "",     _("^BG%s^BG captured %s^BG control point"), "")
     MULTITEAM_INFO(ONSLAUGHT_CPDESTROYED, 4,                1,  2, 0, "s1 s2", "",      "",     _("^TC^TT^BG team %s^BG control point has been destroyed by %s"), "", NAME)
     MULTITEAM_INFO(ONSLAUGHT_GENDESTROYED, 4,               1,  0, 0, "", "",           "",     _("^TC^TT^BG generator has been destroyed"), "", GENERATOR)
     MSG_CENTER_NOTIF(TEAMCHANGE_SUICIDE,                1,      0, 1, "",               CPID_TEAMCHANGE,        "1 f1", _("^K1Suicide in ^COUNT"), "")
 
     MSG_CENTER_NOTIF(TIMEOUT_BEGINNING,                 1,      0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout begins in ^COUNT"), "")
-    MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    1,      0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout ends in ^COUNT"), "")
+    MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    1,      0, 1, "",               CPID_TIMEIN,            "1 f1", _("^F4Timeout ends in ^COUNT"), "")
 
     MSG_CENTER_NOTIF(JOIN_PREVENT_MINIGAME,             1,      0, 0, "",               CPID_Null,              "0 0",  _("^K1Cannot join given minigame session!"), "" )
 
index e7a02dd65947354eec106c17a68275eebfeb2a85..d2682a148f70c937ea202d0ed7e1b1822109b114 100644 (file)
@@ -65,6 +65,7 @@ ENUMCLASS(CPID)
        CASE(CPID, RACE_FINISHLAP)
        CASE(CPID, TEAMCHANGE)
        CASE(CPID, TIMEOUT)
+       CASE(CPID, TIMEIN)
        CASE(CPID, VEHICLES)
        CASE(CPID, VEHICLES_OTHER)
        /** always last */
index f9f89a73fa6ec8a5da6bf70d62227079c8569d5d..7424d695aa041cf2eb557576d209df327ae60a77 100644 (file)
@@ -840,7 +840,7 @@ LABEL(pickup)
                                if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
                                {
                                        Item_Show(it, -1);
-                                       RandomSelection_Add(it, 0, string_null, it.cnt, 0);
+                                       RandomSelection_AddEnt(it, it.cnt, 0);
                                }
                        });
                        e = RandomSelection_chosen_ent;
@@ -882,7 +882,7 @@ void Item_FindTeam(entity this)
                IL_EACH(g_items, it.team == this.team,
                {
                        if(it.classname != "item_flag_team" && it.classname != "item_kh_key")
-                               RandomSelection_Add(it, 0, string_null, it.cnt, 0);
+                               RandomSelection_AddEnt(it, it.cnt, 0);
                });
 
                e = RandomSelection_chosen_ent;
index b5e97b1fc7516f1a082a82d69c354a85f4b8594e..949f478fdd3c714e9ba3402416be4b182c348b7a 100644 (file)
@@ -92,7 +92,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
                                        RandomSelection_Init();
                                        FOREACH_WORD(teleporter.noise, true,
                                        {
-                                               RandomSelection_Add(NULL, 0, it, 1, 1);
+                                               RandomSelection_AddString(it, 1, 1);
                                        });
                                        thesound = RandomSelection_chosen_string;
                                }
@@ -198,7 +198,7 @@ entity Simple_TeleportPlayer(entity teleporter, entity player)
                                if(check_tdeath(player, locout, '0 0 0', '0 0 0'))
                                        p = 0;
                        }
-                       RandomSelection_Add(it, 0, string_null, (it.cnt ? it.cnt : 1), p);
+                       RandomSelection_AddEnt(it, (it.cnt ? it.cnt : 1), p);
                });
                e = RandomSelection_chosen_ent;
        }
index ef13dd5bec0d95af57d2432ba25e83953335cfa5..498f0ff2dbbffb885c36a546ff7f4faba2bac378 100644 (file)
@@ -155,9 +155,9 @@ void trigger_push_touch(entity this, entity toucher)
                for(e = NULL; (e = find(e, targetname, this.target)); )
                {
                        if(e.cnt)
-                               RandomSelection_Add(e, 0, string_null, e.cnt, 1);
+                               RandomSelection_AddEnt(e, e.cnt, 1);
                        else
-                               RandomSelection_Add(e, 0, string_null, 1, 1);
+                               RandomSelection_AddEnt(e, 1, 1);
                }
                toucher.velocity = trigger_push_calculatevelocity(toucher.origin, RandomSelection_chosen_ent, this.height);
        }
index 54e1e09919f06666bb6ff1b22c379b5f7577bc0c..8a63e3b6836a428c2bdfcdf7e7e422d581f73821 100644 (file)
@@ -260,7 +260,7 @@ void SUB_UseTargets_Ex(entity this, entity actor, entity trigger, bool preventRe
                                {
                                        if(this.target_random)
                                        {
-                                               RandomSelection_Add(t, 0, string_null, 1, 0);
+                                               RandomSelection_AddEnt(t, 1, 0);
                                        }
                                        else
                                        {
index cf55aa65214b7a84673da155f3ffb0eece56eb36..763dd6e8de83646cefda1786d8f6b51d3ce1dbaf 100644 (file)
@@ -204,7 +204,7 @@ void W_RandomWeapons(entity e, float n)
                RandomSelection_Init();
                FOREACH(Weapons, it != WEP_Null, {
                        if (remaining & (it.m_wepset))
-                               RandomSelection_Add(it, 0, string_null, 1, 1);
+                               RandomSelection_AddEnt(it, 1, 1);
                });
                Weapon w = RandomSelection_chosen_ent;
                result |= WepSet_FromWeapon(w);
index 1fdb8d6ad6773a78cba7a24b428b15c389193357..df9bd470a31b9fe70caaf68cde8a2d4ff6aebf7f 100644 (file)
@@ -40,6 +40,7 @@ CLASS(Devastator, Weapon)
         P(class, prefix, remote_edgedamage, float, NONE) \
         P(class, prefix, remote_force, float, NONE) \
         P(class, prefix, remote_jump_damage, float, NONE) \
+        P(class, prefix, remote_jump_force, float, NONE) \
         P(class, prefix, remote_jump_radius, float, NONE) \
         P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
         P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
@@ -141,50 +142,56 @@ void W_Devastator_DoRemoteExplode(entity this, .entity weaponentity)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       float handled_as_rocketjump = false;
+       bool handled_as_rocketjump = false;
+       entity head = NULL;
 
-       entity head = WarpZone_FindRadius(
-               this.origin,
-               WEP_CVAR(devastator, remote_jump_radius),
-               false
-       );
-
-       while(head)
+       if(WEP_CVAR(devastator, remote_jump_radius))
        {
-               if(head.takedamage && (head == this.realowner))
+               head = WarpZone_FindRadius(
+                       this.origin,
+                       WEP_CVAR(devastator, remote_jump_radius),
+                       false
+               );
+
+               while(head)
                {
-                       float distance_to_head = vlen(this.origin - head.WarpZone_findradius_nearest);
-                       if(distance_to_head <= WEP_CVAR(devastator, remote_jump_radius))
+                       if(head.takedamage && (head == this.realowner))
                        {
-                               // we handled this as a rocketjump :)
-                               handled_as_rocketjump = true;
-
-                               // modify velocity
-                               head.velocity_x *= 0.9;
-                               head.velocity_y *= 0.9;
-                               head.velocity_z = bound(
-                                       WEP_CVAR(devastator, remote_jump_velocity_z_min),
-                                       head.velocity.z + WEP_CVAR(devastator, remote_jump_velocity_z_add),
-                                       WEP_CVAR(devastator, remote_jump_velocity_z_max)
-                               );
-
-                               // now do the damage
-                               RadiusDamage(
-                                       this,
-                                       head,
-                                       WEP_CVAR(devastator, remote_jump_damage),
-                                       WEP_CVAR(devastator, remote_jump_damage),
-                                       WEP_CVAR(devastator, remote_jump_radius),
-                                       NULL,
-                                       head,
-                                       0,
-                                       this.projectiledeathtype | HITTYPE_BOUNCE,
-                                       NULL
-                               );
-                               break;
+                               if(vdist(this.origin - head.WarpZone_findradius_nearest, <=, WEP_CVAR(devastator, remote_jump_radius)))
+                               {
+                                       // we handled this as a rocketjump :)
+                                       handled_as_rocketjump = true;
+
+                                       // modify velocity
+                                       if(WEP_CVAR(devastator, remote_jump_velocity_z_add))
+                                       {
+                                               head.velocity_x *= 0.9;
+                                               head.velocity_y *= 0.9;
+                                               head.velocity_z = bound(
+                                                       WEP_CVAR(devastator, remote_jump_velocity_z_min),
+                                                       head.velocity.z + WEP_CVAR(devastator, remote_jump_velocity_z_add),
+                                                       WEP_CVAR(devastator, remote_jump_velocity_z_max)
+                                               );
+                                       }
+
+                                       // now do the damage
+                                       RadiusDamage(
+                                               this,
+                                               head,
+                                               WEP_CVAR(devastator, remote_jump_damage),
+                                               WEP_CVAR(devastator, remote_jump_damage),
+                                               WEP_CVAR(devastator, remote_jump_radius),
+                                               NULL,
+                                               head,
+                                               (WEP_CVAR(devastator, remote_jump_force) ? WEP_CVAR(devastator, remote_jump_force) : 0),
+                                               this.projectiledeathtype | HITTYPE_BOUNCE,
+                                               NULL
+                                       );
+                                       break;
+                               }
                        }
+                       head = head.chain;
                }
-               head = head.chain;
        }
 
        RadiusDamage(
index c2b93747c8c4c14d7d9437f6c50e2cc2934b8d89..ae1e48bb2c3e7f511af59d27ba3235a2434f07f5 100644 (file)
@@ -150,7 +150,7 @@ void W_Fireball_LaserPlay(entity this, float dt, float dist, float damage, float
                if(d < dist)
                {
                        e.fireball_impactvec = p;
-                       RandomSelection_Add(e, 0, string_null, 1 / (1 + d), !Fire_IsBurning(e));
+                       RandomSelection_AddEnt(e, 1 / (1 + d), !Fire_IsBurning(e));
                }
        }
        if(RandomSelection_chosen_ent)
index 23e7c23ae5b2b16ccdd9b918e03ea378cfef60e4..ba7efe6a31a33384e1c1b0cbcb0a535e6ca72b99 100644 (file)
@@ -383,13 +383,16 @@ void Draw_GrapplingHook(entity this)
                        break;
        }
 
-       if((this.owner.sv_entnum == player_localentnum - 1) && autocvar_chase_active <= 0)
+       if((this.owner.sv_entnum == player_localentnum - 1))
        {
                switch(this.HookType)
                {
                        default:
                        case NET_ENT_CLIENT_HOOK:
-                               a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
+                               if(autocvar_chase_active > 0)
+                                       a = csqcplayer.origin;
+                               else
+                                       a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
                                b = this.origin;
                                break;
                        case NET_ENT_CLIENT_ARC_BEAM:
index 2287d869d0c455bdbf15c77950ac8a5671f20b64..627fec11a92e1293bec76db098230b0a5fafc7f0 100644 (file)
@@ -9,7 +9,7 @@ void RandomSelection_Init()
        RandomSelection_best_priority = -1;
 }
 
-void RandomSelection_Add(entity e, float f, string s, float weight, float priority)
+void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority)
 {
        if (priority > RandomSelection_best_priority)
        {
@@ -17,6 +17,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
                RandomSelection_chosen_ent = e;
                RandomSelection_chosen_float = f;
                RandomSelection_chosen_string = s;
+               RandomSelection_chosen_vec = v;
                RandomSelection_totalweight = weight;
        }
        else if (priority == RandomSelection_best_priority)
@@ -27,6 +28,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
                        RandomSelection_chosen_ent = e;
                        RandomSelection_chosen_float = f;
                        RandomSelection_chosen_string = s;
+                       RandomSelection_chosen_vec = v;
                }
        }
 }
index 1834a97a331164086464ce6ecc87d0527971fb9a..b2fc53f0cac4edaaa3ef964c25b7b6093ac2ae2c 100644 (file)
@@ -5,9 +5,14 @@ float RandomSelection_best_priority;
 entity RandomSelection_chosen_ent;
 float RandomSelection_chosen_float;
 string RandomSelection_chosen_string;
+vector RandomSelection_chosen_vec;
 
 void RandomSelection_Init();
-void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
+void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority);
+#define RandomSelection_AddEnt(e, weight, priority) RandomSelection_Add(e, 0, string_null, '0 0 0', weight, priority)
+#define RandomSelection_AddFloat(f, weight, priority) RandomSelection_Add(NULL, f, string_null, '0 0 0', weight, priority)
+#define RandomSelection_AddString(s, weight, priority) RandomSelection_Add(NULL, 0, s, '0 0 0', weight, priority)
+#define RandomSelection_AddVec(v, weight, priority) RandomSelection_Add(NULL, 0, string_null, v, weight, priority)
 
 // prandom - PREDICTABLE random number generator
 
index ca12d0d651cf53e9caa39a6afa01bd3528a466f8..bdde55b9aa94683b7ffb0901229203fb1ff59116 100644 (file)
@@ -177,7 +177,7 @@ void bot_setnameandstuff(entity this)
                                        break;
                                }
                        ));
-                       RandomSelection_Add(NULL, 0, readfile, 1, prio);
+                       RandomSelection_AddString(readfile, 1, prio);
                }
                readfile = RandomSelection_chosen_string;
                fclose(file);
index 9f763a886d73217cd4490aa05fba9f75a2add448..543a3f98d2174346e3fd61b27ae320ea15fd3f78 100644 (file)
@@ -262,7 +262,7 @@ float CheatImpulse(entity this, int imp)
                case CHIMPULSE_R00T.impulse:
                        IS_CHEAT(this, imp, 0, 0);
                        RandomSelection_Init();
-                       FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it) && DIFF_TEAM(it, this), LAMBDA(RandomSelection_Add(it, 0, string_null, 1, 1)));
+                       FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it) && DIFF_TEAM(it, this), LAMBDA(RandomSelection_AddEnt(it, 1, 1)));
                        if(RandomSelection_chosen_ent)
                                e = RandomSelection_chosen_ent;
                        else
@@ -475,9 +475,9 @@ float CheatCommand(entity this, int argc)
                        RandomSelection_Init();
                        crosshair_trace(this);
                        for(entity e = NULL; (e = find(e, classname, "dragbox_box")); )
-                               RandomSelection_Add(e, 0, string_null, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
+                               RandomSelection_AddEnt(e, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
                        for(entity e = NULL; (e = find(e, classname, "dragpoint")); )
-                               RandomSelection_Add(e, 0, string_null, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
+                               RandomSelection_AddEnt(e, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
                        if(RandomSelection_chosen_ent)
                        {
                                delete(RandomSelection_chosen_ent.killindicator.killindicator);
@@ -497,9 +497,9 @@ float CheatCommand(entity this, int argc)
                                RandomSelection_Init();
                                crosshair_trace(this);
                                for(entity e = NULL; (e = find(e, classname, "dragbox_box")); )
-                                       RandomSelection_Add(e, 0, string_null, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
+                                       RandomSelection_AddEnt(e, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
                                for(entity e = NULL; (e = find(e, classname, "dragpoint")); )
-                                       RandomSelection_Add(e, 0, string_null, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
+                                       RandomSelection_AddEnt(e, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos));
                                if(RandomSelection_chosen_ent)
                                {
                                        if(substring(argv(1), 0, 1) == "*")
index 35418a02f07d420a9e0805f341a73cbaa6632ca5..ec1f9c89fa7adce3f5887a553f998c701faec3f7 100644 (file)
@@ -210,6 +210,7 @@ void timeout_handler_think(entity this)
                        }
                        else  // time to end the timeout
                        {
+                               Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_TIMEIN);
                                timeout_status = TIMEOUT_INACTIVE;
 
                                // reset the slowmo value back to normal
index fe7822bc161549c5ab9f45a93eb5b61d6df24aad..be21020d4dc5f71cf84fe6a3dd836851473edba4 100644 (file)
@@ -1503,7 +1503,7 @@ void FixIntermissionClient(entity e)
                        stuffcmd(e, "\nscr_printspeed 1000000\n");
                        RandomSelection_Init();
                        FOREACH_WORD(autocvar_sv_intermission_cdtrack, true, LAMBDA(
-                               RandomSelection_Add(NULL, 0, it, 1, 1);
+                               RandomSelection_AddString(it, 1, 1);
                        ));
                        if (RandomSelection_chosen_string != "")
                        {
index 29768893a727dc3730bb723dfdb38f25ee72fb5a..7c7c02018c2afb1f664cab59800734bdca75606b 100644 (file)
@@ -522,7 +522,7 @@ float MapVote_CheckRules_2()
        for(i = 0; i < mapvote_count_real; ++i)
                if ( mapvote_maps_flags[i] & GTV_AVAILABLE )
                {
-                       RandomSelection_Add(NULL, i, string_null, 1, mapvote_selections[i]);
+                       RandomSelection_AddFloat(i, 1, mapvote_selections[i]);
                        if ( gametypevote &&  mapvote_maps[i] == MapInfo_Type_ToString(MapInfo_CurrentGametype()) )
                        {
                                currentVotes = mapvote_selections[i];
@@ -542,7 +542,7 @@ float MapVote_CheckRules_2()
        for(i = 0; i < mapvote_count_real; ++i)
                if(i != firstPlace)
                if ( mapvote_maps_flags[i] & GTV_AVAILABLE )
-                       RandomSelection_Add(NULL, i, string_null, 1, mapvote_selections[i]);
+                       RandomSelection_AddFloat(i, 1, mapvote_selections[i]);
        secondPlace = RandomSelection_chosen_float;
        secondPlaceVotes = RandomSelection_best_priority;
        //dprint("Second place: ", ftos(secondPlace), "\n");
index 61fe75ea49fa6128066e5fb294a988f157e5deb1..a057408b965846b31c1c2bd7e2486b9d03b1fcee 100644 (file)
@@ -45,7 +45,7 @@ int invasion_PickMonster(int supermonster_count)
        {
                if((it.spawnflags & MONSTER_TYPE_FLY) || (it.spawnflags & MONSTER_TYPE_SWIM) || (it.spawnflags & MONSTER_SIZE_QUAKE) || ((it.spawnflags & MON_FLAG_SUPERMONSTER) && supermonster_count >= 1))
                        continue;
-        RandomSelection_Add(NULL, it.monsterid, string_null, 1, 1);
+        RandomSelection_AddFloat(it.monsterid, 1, 1);
        });
 
        return RandomSelection_chosen_float;
@@ -57,7 +57,7 @@ entity invasion_PickSpawn()
 
        IL_EACH(g_invasion_spawns, true,
        {
-               RandomSelection_Add(it, 0, string_null, 1, ((time >= it.spawnshieldtime) ? 0.2 : 1)); // give recently used spawnpoints a very low rating
+               RandomSelection_AddEnt(it, 1, ((time >= it.spawnshieldtime) ? 0.2 : 1)); // give recently used spawnpoints a very low rating
                it.spawnshieldtime = time + autocvar_g_invasion_spawnpoint_spawn_delay;
        });
 
@@ -96,10 +96,10 @@ void invasion_SpawnChosenMonster(int mon)
        else
        {
                RandomSelection_Init();
-               if(inv_monsters_perteam[NUM_TEAM_1] > 0) RandomSelection_Add(NULL, NUM_TEAM_1, string_null, 1, 1);
-               if(inv_monsters_perteam[NUM_TEAM_2] > 0) RandomSelection_Add(NULL, NUM_TEAM_2, string_null, 1, 1);
-               if(invasion_teams >= 3) if(inv_monsters_perteam[NUM_TEAM_3] > 0) { RandomSelection_Add(NULL, NUM_TEAM_3, string_null, 1, 1); }
-               if(invasion_teams >= 4) if(inv_monsters_perteam[NUM_TEAM_4] > 0) { RandomSelection_Add(NULL, NUM_TEAM_4, string_null, 1, 1); }
+               if(inv_monsters_perteam[NUM_TEAM_1] > 0) RandomSelection_AddFloat(NUM_TEAM_1, 1, 1);
+               if(inv_monsters_perteam[NUM_TEAM_2] > 0) RandomSelection_AddFloat(NUM_TEAM_2, 1, 1);
+               if(invasion_teams >= 3) if(inv_monsters_perteam[NUM_TEAM_3] > 0) { RandomSelection_AddFloat(NUM_TEAM_3, 1, 1); }
+               if(invasion_teams >= 4) if(inv_monsters_perteam[NUM_TEAM_4] > 0) { RandomSelection_AddFloat(NUM_TEAM_4, 1, 1); }
 
                monster.team = RandomSelection_chosen_float;
        }
index 59cc052af421942def992c27f5103fd3d08d00d8..18d32c2f06369b05dd5be39db868aca414a10d44 100644 (file)
@@ -317,7 +317,7 @@ entity Spawn_WeightedPoint(entity firstspot, float lower, float upper, float exp
 
        RandomSelection_Init();
        for(spot = firstspot; spot; spot = spot.chain)
-               RandomSelection_Add(spot, 0, string_null, pow(bound(lower, spot.spawnpoint_score.y, upper), exponent) * spot.cnt, (spot.spawnpoint_score.y >= lower) * 0.5 + spot.spawnpoint_score.x);
+               RandomSelection_AddEnt(spot, pow(bound(lower, spot.spawnpoint_score.y, upper), exponent) * spot.cnt, (spot.spawnpoint_score.y >= lower) * 0.5 + spot.spawnpoint_score.x);
 
        return RandomSelection_chosen_ent;
 }
index 6ccb7d408186a2c473c4860bd7a210860e9deea2..4632866b4886755e7657da57ca2cc95fa3039109 100644 (file)
@@ -508,13 +508,13 @@ float FindSmallestTeam(entity pl, float ignore_pl)
 
        // now t is the minimum, or A minimum!
        if(t == 1 || TeamSmallerEqThanTeam(1, t, pl))
-               RandomSelection_Add(NULL, 1, string_null, 1, 1);
+               RandomSelection_AddFloat(1, 1, 1);
        if(t == 2 || TeamSmallerEqThanTeam(2, t, pl))
-               RandomSelection_Add(NULL, 2, string_null, 1, 1);
+               RandomSelection_AddFloat(2, 1, 1);
        if(t == 3 || TeamSmallerEqThanTeam(3, t, pl))
-               RandomSelection_Add(NULL, 3, string_null, 1, 1);
+               RandomSelection_AddFloat(3, 1, 1);
        if(t == 4 || TeamSmallerEqThanTeam(4, t, pl))
-               RandomSelection_Add(NULL, 4, string_null, 1, 1);
+               RandomSelection_AddFloat(4, 1, 1);
 
        return RandomSelection_chosen_float;
 }