]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'terencehill/automatic_sendcvar' into 'master'
authorMario <mario.mario@y7mail.com>
Sat, 24 Aug 2019 17:09:17 +0000 (17:09 +0000)
committerMario <mario.mario@y7mail.com>
Sat, 24 Aug 2019 17:09:17 +0000 (17:09 +0000)
Automatic sendcvar

Closes #2270

See merge request xonotic/xonotic-data.pk3dir!694

16 files changed:
.gitlab-ci.yml
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
binds-xonotic.cfg
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/mapobjects/misc/teleport_dest.qc
qcsrc/common/mapobjects/teleporters.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/new_toys/sv_new_toys.qc
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/state.qc
qcsrc/server/client.qc

index 22bfe39d76fcbf6e535d32e86dfa07a4e2f323af..86d5528b9265fa44cd2fb78df741ae437d4ba0a8 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=e1e069b401a7aaf28fed29e2e8cbc0c8
+    - EXPECT=436bcf411c761042d68896ae92f630d5
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 8ae104ae86f76cff2296623343a755a988e2f852..5859862778bb341b660c795645e0ff093a2c1d78 100644 (file)
@@ -71,7 +71,7 @@ set g_balance_machinegun_burst_ammo 3
 set g_balance_machinegun_burst_animtime 0.3
 set g_balance_machinegun_burst_refire 0.06
 set g_balance_machinegun_burst_refire2 0.45
-set g_balance_machinegun_burst_spread 0
+set g_balance_machinegun_burst_spread 0.02
 set g_balance_machinegun_first 1
 set g_balance_machinegun_first_ammo 1
 set g_balance_machinegun_first_damage 14
index 95b62730c953f5b6bffbf479674def840eefa576..f49629922216af6a680399cd27d830a19ab777c0 100644 (file)
@@ -71,7 +71,7 @@ set g_balance_machinegun_burst_ammo 3
 set g_balance_machinegun_burst_animtime 0.75
 set g_balance_machinegun_burst_refire 0.05
 set g_balance_machinegun_burst_refire2 0.75
-set g_balance_machinegun_burst_spread 0
+set g_balance_machinegun_burst_spread 0.04
 set g_balance_machinegun_first 1
 set g_balance_machinegun_first_ammo 1
 set g_balance_machinegun_first_damage 30
index 109c3d8f84fe5a5dddfa20e0717cb61bcee3f8c8..1b8a388d42ea2b9890d008b161eaea4fb7547492 100644 (file)
@@ -71,7 +71,7 @@ set g_balance_machinegun_burst_ammo 3
 set g_balance_machinegun_burst_animtime 0.3
 set g_balance_machinegun_burst_refire 0.06
 set g_balance_machinegun_burst_refire2 0.45
-set g_balance_machinegun_burst_spread 0
+set g_balance_machinegun_burst_spread 0.02
 set g_balance_machinegun_first 1
 set g_balance_machinegun_first_ammo 1
 set g_balance_machinegun_first_damage 14
index aaf3124617ba8eff319c3fe54671a692f9105325..149895e664f0c388fa41e23d03d2021821a3412e 100644 (file)
@@ -71,7 +71,7 @@ set g_balance_machinegun_burst_ammo 3
 set g_balance_machinegun_burst_animtime 0.3
 set g_balance_machinegun_burst_refire 0.06
 set g_balance_machinegun_burst_refire2 0.45
-set g_balance_machinegun_burst_spread 0
+set g_balance_machinegun_burst_spread 0.03
 set g_balance_machinegun_first 1
 set g_balance_machinegun_first_ammo 1
 set g_balance_machinegun_first_damage 14
index 611f5da95a867d7be500d8caf38b8a84038f12e0..3bdf7909633a288625182623498ba8a4106bc8b7 100644 (file)
@@ -65,7 +65,6 @@ bind F10 menu_showquitdialog
 bind F11 disconnect
 bind F12 screenshot
 bind F4 ready
-bind ALT +showaccuracy
 
 // Gamepad defaults. Tested with Logitech Rumblepad 2, I hope similar ones works as well.
 bind JOY1 "+crouch"
@@ -157,4 +156,4 @@ seta "userbind31_press" ""; seta "userbind31_release" ""; seta "userbind31_descr
 seta "userbind32_press" ""; seta "userbind32_release" ""; seta "userbind32_description" ""
 alias _userbind_call "${$1}"
 alias +userbind "_userbind_call userbind${1}_press"
-alias -userbind "_userbind_call userbind${1}_release"
\ No newline at end of file
+alias -userbind "_userbind_call userbind${1}_release"
index 57c9f7b7086f2c8ce25ff9f25cf475c2664c334c..7dd231fe6046b6902105aa4e2079cca389f922e4 100644 (file)
@@ -253,7 +253,7 @@ set g_ctf_stalemate 1 "show the enemy flagcarrier location after both teams have
 set g_ctf_stalemate_endcondition 1 "condition for stalemate mode to be finished: 1 = If ONE flag is no longer stale, 2 = If BOTH flags are no longer stale"
 set g_ctf_stalemate_time 60 "time for each flag until stalemate mode is activated"
 set g_ctf_flagcarrier_waypointforenemy_spotting 1 "show the enemy flagcarrier location if a team mate presses +use to spot them"
-set g_ctf_dropped_capture_delay 1 "dropped capture delay"
+set g_ctf_dropped_capture_delay 1.5 "autocapture delay when flag is thrown onto the base - counted from throw, not landing"
 set g_ctf_dropped_capture_radius 100 "allow dropped flags to be automatically captured by base flags if the dropped flag is within this radius of it"
 set g_ctf_flag_damageforcescale 2
 set g_ctf_portalteleport 0 "allow flag carriers to go through portals made in portal gun without dropping the flag"
index 0a8370899dea2bce50728c5f674b623240e446e9..cf2821844aa01666e3b3fb2a62df7b0d900cefc5 100644 (file)
@@ -508,6 +508,8 @@ MUTATOR_HOOKFUNCTION(ca, SetWeaponArena)
 
 MUTATOR_HOOKFUNCTION(ca, SV_ParseServerCommand)
 {
-       shuffleteams_on_reset_map = !allowed_to_spawn;
+       string cmd_name = M_ARGV(0, string);
+       if (cmd_name == "shuffleteams")
+               shuffleteams_on_reset_map = !allowed_to_spawn;
        return false;
 }
index 2dfcf48112447ad1a5411a60b3c5f925e567b3b2..0f37cf1e8fa4673c4c77e3553d6b55d84fd08557 100644 (file)
@@ -612,7 +612,9 @@ MUTATOR_HOOKFUNCTION(ft, FragCenterMessage)
 
 MUTATOR_HOOKFUNCTION(ft, SV_ParseServerCommand)
 {
-       shuffleteams_on_reset_map = !(round_handler_IsActive() && !round_handler_IsRoundStarted());
+       string cmd_name = M_ARGV(0, string);
+       if (cmd_name == "shuffleteams")
+               shuffleteams_on_reset_map = !(round_handler_IsActive() && !round_handler_IsRoundStarted());
        return false;
 }
 
index 126a20ea26ec08e254c1ee6e9d9473479b084dda..e7eedd52c413474745eab4e7c142db34f14dba34 100644 (file)
@@ -43,7 +43,10 @@ spawnfunc(info_teleport_destination)
        {
        }
        else
+       {
                objerror (this, "^3Teleport destination without a targetname");
+               return; // don't link it to CSQC in this case!
+       }
 
        teleport_dest_link(this);
 }
index 339ade52a775cc86462c7f991b82a8d5ba8ac366..da86cabce89b83c048ed8a99342e07d501dcee2b 100644 (file)
@@ -257,7 +257,7 @@ void teleport_findtarget(entity this)
        if(n == 0)
        {
                // no dest!
-               objerror (this, "Teleporter with nonexistant target");
+               objerror (this, "Teleporter with nonexistent target");
                return;
        }
        else if(n == 1)
index c707f8c38e5ede6509fd6620456bbbd7288468e7..0673cd0baf24810d20dc452ce469e73a6ae31a51 100644 (file)
@@ -1318,7 +1318,7 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
 
        if(!autocvar_g_monsters) { Monster_Remove(this); return false; }
 
-       if(!(this.spawnflags & MONSTERFLAG_RESPAWNED))
+       if(!(this.spawnflags & MONSTERFLAG_RESPAWNED) && !(this.flags & FL_MONSTER))
        {
                IL_PUSH(g_monsters, this);
                if(this.mdl && this.mdl != "")
index 37dac8f93123d0624d78e44f90e918e828c659d8..47e1c97a9a9a70f1df5a7214ac56e12e8080bbed 100644 (file)
@@ -28,7 +28,7 @@ Entity:
 -> This will spawn as Rifle in this mutator ONLY, and as Vortex otherwise.
 
 {
-"classname" "weapon_vortext"
+"classname" "weapon_vortex"
 "new_toys" "vortex rifle"
 }
 -> This will spawn as either Vortex or Rifle in this mutator ONLY, and as Vortex otherwise.
index b3f460ce7d99daaf5f6c1dab28832cbca57a5ad8..4539466a24feb9f10d97f6652f3eb31c519af490 100644 (file)
@@ -509,10 +509,11 @@ bool _Movetype_PushEntity(entity this, vector push, bool failonstartsolid, bool
 {
        _Movetype_PushEntityTrace(this, push);
 
+       // NOTE: this is a workaround for the QC's lack of a worldstartsolid trace parameter
        if(trace_startsolid && failonstartsolid)
        {
                int oldtype = this.move_nomonsters;
-               this.move_nomonsters = MOVE_NOMONSTERS;
+               this.move_nomonsters = MOVE_WORLDONLY;
                _Movetype_PushEntityTrace(this, push);
                this.move_nomonsters = oldtype;
                if(trace_startsolid)
@@ -527,7 +528,7 @@ bool _Movetype_PushEntity(entity this, vector push, bool failonstartsolid, bool
                _Movetype_LinkEdict(this, true);
 
        if(trace_fraction < 1)
-               if(this.solid >= SOLID_TRIGGER && (!IS_ONGROUND(this) || (this.groundentity != trace_ent)))
+               if(this.solid >= SOLID_TRIGGER && trace_ent && (!IS_ONGROUND(this) || (this.groundentity != trace_ent)))
                        _Movetype_Impact(this, trace_ent);
 
        return (this.origin == last_origin); // false if teleported by touch
index 24c0b7c6f4dc6789415ce61b639bde0a68848664..0f40acfc6856b65ad68446091b5a9142d3d16e13 100644 (file)
@@ -5,6 +5,9 @@ void Inventory_delete(entity this);
 
 void PlayerState_attach(entity this)
 {
+       if (PS(this))
+               return;
+
        this._ps = NEW(PlayerState, this);
 
        Inventory_new(PS(this));
index 5029da7df9613f216a5ba89cedd44b70b647e801..0034c2dd9ee3b687a0b600eee0b850cc056dfb89 100644 (file)
@@ -1683,6 +1683,7 @@ void SpectateCopy(entity this, entity spectatee)
        this.effects = spectatee.effects & EFMASK_CHEAP; // eat performance
        SetResourceExplicit(this, RES_HEALTH, GetResource(spectatee, RES_HEALTH));
        CS(this).impulse = 0;
+       this.disableclientprediction = 1; // no need to run prediction on a spectator
        this.items = spectatee.items;
        STAT(LAST_PICKUP, this) = STAT(LAST_PICKUP, spectatee);
        STAT(HIT_TIME, this) = STAT(HIT_TIME, spectatee);