]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'martin-t/shield' into 'master'
authorMario <zacjardine@y7mail.com>
Thu, 8 Feb 2018 00:58:09 +0000 (00:58 +0000)
committerMario <zacjardine@y7mail.com>
Thu, 8 Feb 2018 00:58:09 +0000 (00:58 +0000)
Make shield reduce force as well (unless selfpush)

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

33 files changed:
.tx/merge-base
balance-mario.cfg
balance-nexuiz25.cfg
balance-overkill.cfg
balance-samual.cfg
balance-xdf.cfg
balance-xonotic.cfg
balance-xpm.cfg
common.ru.po
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh
qcsrc/common/triggers/target/_mod.inc
qcsrc/common/triggers/target/_mod.qh
qcsrc/common/triggers/target/include.qc
qcsrc/common/triggers/target/spawnpoint.qc [new file with mode: 0644]
qcsrc/common/triggers/target/spawnpoint.qh [new file with mode: 0644]
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/menu/xonotic/dialog_settings_effects.qc
qcsrc/menu/xonotic/dialog_settings_game_view.qc
qcsrc/menu/xonotic/dialog_settings_user.qc
qcsrc/menu/xonotic/dialog_settings_video.qc
qcsrc/menu/xonotic/slider_particles.qc
qcsrc/menu/xonotic/slider_picmip.qc
qcsrc/server/autocvars.qh
qcsrc/server/client.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/weapons/weaponsystem.qc

index ea348040dc5873f71545159c20755a479a1f80d6..95558bedda63e69c779274b731b709d48eb79b68 100644 (file)
@@ -1 +1 @@
-Sun Feb  4 07:24:40 CET 2018
+Wed Feb  7 07:23:41 CET 2018
index 830270043f96ad512774435973ef5c2e5b642c2d..4dda8bdc8842318701f1dcc39e95db6a87f8f7c3 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 2
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index f11edbfa8f9d75fb359027b9a45c44d85bed3c9b..73c63df9b7277014a78e9be149afa5dd222e9a23 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 15
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 15
+set g_pickup_respawntime_initial_random 2
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index cb15afb2f29919a238bad8c7a1552d8b37c6535d..bf2ecc623cccf3ebd3fba2cc0afecb2ec7432e40 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 0
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index d5ba21361119a0d7f3e11f4666138c26c9444dec..9bcb976b60853f8dda7a81c66d22806766eaac02 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 2
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index 2b123ff89463fe972055b05f7aaa012938a12d9d..245fa7cc4cd06cdc0a8eabcf5ac346fc8190a5a7 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 0.1
 set g_pickup_respawntime_weapon 0.1
 set g_pickup_respawntime_superweapon 0.1
 set g_pickup_respawntime_ammo 0.1
+set g_pickup_respawntime_initial_random 2
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index 90734fdde5586bfac0dd07a2021c4453b2f68552..e19872454fa57d9b9cdfdd77ac6319763f390432 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 1
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index b9fa6f6a7a3286ff3a618a36733aff6f5df680f8..5b8c67d2f5f9395af13f8fadde4a28c613a930e8 100644 (file)
@@ -101,6 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 1
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
index eaf5cda86d8d2aff3a8c98589c8554662b40dcf4..629f1cd1b94df70257183ec3e1a3d8a62ea8ce5e 100644 (file)
@@ -6,7 +6,7 @@
 # adem4ik, 2014
 # Alex Talker <alextalker7@gmail.com>, 2014-2015
 # Andrei Stepanov, 2014
-# Andrei Stepanov, 2014-2017
+# Andrei Stepanov, 2014-2018
 # Andrey P <andrey.pyntikov@gmail.com>, 2016
 # Artem Vorotnikov <artem@vorotnikov.me>, 2015
 # Lord Canistra <lordcanistra@gmail.com>, 2011
@@ -18,7 +18,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-09-19 19:55+0000\n"
+"PO-Revision-Date: 2018-02-06 07:53+0000\n"
 "Last-Translator: Andrei Stepanov\n"
 "Language-Team: Russian (http://www.transifex.com/team-xonotic/xonotic/"
 "language/ru/)\n"
@@ -1305,8 +1305,8 @@ msgid ""
 "Kill enemies to freeze them, stand next to frozen teammates to revive them; "
 "freeze all enemies to win"
 msgstr ""
-"Поражайте врагов, чтобы заморозить их всех и выиграть раунд, и "
-"Ñ\80азмоÑ\80аживайÑ\82е Ñ\81оÑ\8eзников, Ñ\81Ñ\82оÑ\8f Ñ\80Ñ\8fдом Ñ\81 Ð½Ð¸Ð¼Ð¸"
+"Поражайте врагов, чтобы заморозить их всех и выиграть раунд. Размораживайте "
+"союзников, стоя рядом с ними"
 
 #: qcsrc/common/mapinfo.qh:446
 msgid "Hold the ball to get points for kills"
@@ -7149,7 +7149,7 @@ msgstr "Максимальная"
 
 #: qcsrc/menu/xonotic/dialog_settings_effects.qc:65
 msgid "Geometry detail:"
-msgstr "Детали геометрии:"
+msgstr "Детализация окружения:"
 
 #: qcsrc/menu/xonotic/dialog_settings_effects.qc:67
 msgid "Change the smoothness of the curves on the map (default: normal)"
index 125ef6bf36c99bf5d25a281e88c2053113109a91..836c3983ccb0581703d2ff9a0de2df119a28a5c8 100644 (file)
                CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) \
                CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) \
                CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) \
-               CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 254, -1, 254) \
-               CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 254, -1, 254) \
-               CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 254, -1, 254) \
        CSQCMODEL_ENDIF \
+       CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 16, 0, 255) \
+       CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 16, 0, 255) \
+       CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 16, 0, 255) \
        CSQCMODEL_IF(isplayer) \
                CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) \
                CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
index e13df065a477b5f0f95a7370c484c5968a444ba4..62b02c3794be335982dad2b15e41a8e07be9ab01 100644 (file)
@@ -626,6 +626,7 @@ AUTOCVAR(g_pickup_respawntime_scaling_reciprocal, float, 0.0, "Multiply respawn
 AUTOCVAR(g_pickup_respawntime_scaling_offset, float, 0.0, "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening");
 AUTOCVAR(g_pickup_respawntime_scaling_linear, float, 1.0, "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly");
 
+/// Adjust respawn time according to the number of players.
 float adjust_respawntime(float normal_respawntime) {
        float r = autocvar_g_pickup_respawntime_scaling_reciprocal;
        float o = autocvar_g_pickup_respawntime_scaling_offset;
@@ -660,17 +661,43 @@ void Item_ScheduleRespawn(entity e)
                //LOG_INFOF("item %s will respawn in %f", e.classname, adjusted_respawntime);
 
                // range: adjusted_respawntime - respawntimejitter .. adjusted_respawntime + respawntimejitter
-               float actual_time = adjusted_respawntime + crandom() * e.respawntimejitter;
-               Item_ScheduleRespawnIn(e, actual_time);
+               float respawn_in = adjusted_respawntime + crandom() * e.respawntimejitter;
+               Item_ScheduleRespawnIn(e, respawn_in);
        }
        else // if respawntime is -1, this item does not respawn
                Item_Show(e, -1);
 }
 
+AUTOCVAR(g_pickup_respawntime_initial_random, int, 1,
+       "For items that don't start spawned: 0: spawn after their normal respawntime; 1: spawn after `random * respawntime` with the *same* random; 2: same as 1 but each item has separate random");
+
+float shared_random;
+STATIC_INIT(shared_random) { shared_random = random(); }
 void Item_ScheduleInitialRespawn(entity e)
 {
        Item_Show(e, 0);
-       Item_ScheduleRespawnIn(e, max(0, game_starttime - time) + ((e.respawntimestart) ? e.respawntimestart : ITEM_RESPAWNTIME_INITIAL(e)));
+
+       float spawn_in;
+       if (autocvar_g_pickup_respawntime_initial_random == 0)
+       {
+               // range: respawntime .. respawntime + respawntimejitter
+               spawn_in = e.respawntime + random() * e.respawntimejitter;
+       }
+       else if (autocvar_g_pickup_respawntime_initial_random == 1)
+       {
+               // range:
+               // if respawntime >= ITEM_RESPAWN_TICKS: ITEM_RESPAWN_TICKS .. respawntime + respawntimejitter
+               // else: 0 .. ITEM_RESPAWN_TICKS
+               // this is to prevent powerups spawning unexpectedly without waypoints
+               spawn_in = ITEM_RESPAWN_TICKS + shared_random * (e.respawntime + e.respawntimejitter - ITEM_RESPAWN_TICKS);
+       }
+       else
+       {
+               // range: same as 1
+               spawn_in = ITEM_RESPAWN_TICKS + random() * (e.respawntime + e.respawntimejitter - ITEM_RESPAWN_TICKS);
+       }
+
+       Item_ScheduleRespawnIn(e, max(0, game_starttime - time) + ((e.respawntimestart) ? e.respawntimestart : spawn_in));
 }
 
 void GiveRandomWeapons(entity receiver, int num_weapons, string weapon_names,
index d2f44c61daa8e6544f44f47f4f92a61c54907218..315a100375bd4fc7cfd45911919d0ac9ce42d60d 100644 (file)
@@ -57,9 +57,6 @@ bool have_pickup_item(entity this);
 
 const float ITEM_RESPAWN_TICKS = 10;
 
-#define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS))
-       // range: 10 .. respawntime + respawntimejitter
-
 .float max_armorvalue;
 .float pickup_anyway;
 
index 34c02ba79418fbd2ee5f9d6d3d980c13ea0fcb2b..afd1050b90895d859885081645eff269dadef99a 100644 (file)
@@ -6,5 +6,6 @@
 #include <common/triggers/target/location.qc>
 #include <common/triggers/target/music.qc>
 #include <common/triggers/target/spawn.qc>
+#include <common/triggers/target/spawnpoint.qc>
 #include <common/triggers/target/speaker.qc>
 #include <common/triggers/target/voicescript.qc>
index c59ee797615bfbd03a753f28a37fb119924263ea..7c9fbeec5425b7f6e13bafce1102ed4744269da6 100644 (file)
@@ -6,5 +6,6 @@
 #include <common/triggers/target/location.qh>
 #include <common/triggers/target/music.qh>
 #include <common/triggers/target/spawn.qh>
+#include <common/triggers/target/spawnpoint.qh>
 #include <common/triggers/target/speaker.qh>
 #include <common/triggers/target/voicescript.qh>
index 4558b71bfcdfc519b97588b9a4f75bc114dad50f..a45c65ed05a6eceb86d9cb7c35b88e1569d1f754 100644 (file)
@@ -6,5 +6,6 @@
 #include "location.qc"
 #include "music.qc"
 #include "spawn.qc"
+#include "spawnpoint.qc"
 #include "speaker.qc"
 #include "voicescript.qc"
diff --git a/qcsrc/common/triggers/target/spawnpoint.qc b/qcsrc/common/triggers/target/spawnpoint.qc
new file mode 100644 (file)
index 0000000..fe15385
--- /dev/null
@@ -0,0 +1,24 @@
+#include "spawnpoint.qh"
+
+#ifdef SVQC
+void target_spawnpoint_use(entity this, entity actor, entity trigger)
+{
+       if(this.active != ACTIVE_ACTIVE)
+               return;
+
+       actor.spawnpoint_targ = this;
+}
+
+void target_spawnpoint_reset(entity this)
+{
+       this.active = ACTIVE_ACTIVE;
+}
+
+// TODO: persistent spawnflag?
+spawnfunc(target_spawnpoint)
+{
+       this.active = ACTIVE_ACTIVE;
+       this.use = target_spawnpoint_use;
+       this.reset = target_spawnpoint_reset;
+}
+#endif
diff --git a/qcsrc/common/triggers/target/spawnpoint.qh b/qcsrc/common/triggers/target/spawnpoint.qh
new file mode 100644 (file)
index 0000000..2eeb8da
--- /dev/null
@@ -0,0 +1,5 @@
+#pragma once
+
+#ifdef SVQC
+.entity spawnpoint_targ;
+#endif
index 41394ac4318909a62f685c869fbf28970919c523..50bf3d05ee0b1e597a352f783fe0b376dd9dd2b3 100644 (file)
@@ -17,7 +17,7 @@ void viewloc_think(entity this)
 
        // set myself as current viewloc where possible
 #if 1
-       FOREACH_CLIENT(it.viewloc == this,
+       FOREACH_CLIENT(IS_PLAYER(it) && it.viewloc == this,
        {
                it.viewloc = NULL;
        });
index 6f5ba8f57913e8ae5ba336c7f6a554001684890f..a9375327ec2e9735b2ea65db1e1632cc44edc5e1 100644 (file)
@@ -64,7 +64,7 @@ void XonoticEffectsSettingsTab_fill(entity me)
        me.gotoRC(me, 1.25, 0);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Geometry detail:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_subdivisions_tolerance",
-                       _("Change the smoothness of the curves on the map (default: normal)")));
+                       _("Change the smoothness of the curves on the map")));
                        e.addValue(e, ZCTX(_("DET^Lowest")), "16");
                        e.addValue(e, ZCTX(_("DET^Low")), "8");
                        e.addValue(e, ZCTX(_("DET^Normal")), "4");
@@ -129,31 +129,31 @@ void XonoticEffectsSettingsTab_fill(entity me)
                {
                        me.TDempty(me, 0.2);
                        me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(3, 0, "r_showsurfaces", _("Show surfaces"),
-                               _("Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly. (default: disabled)")));
+                               _("Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly.")));
                }
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"),
-                       _("Use high resolution lightmaps, which will look pretty but use up some extra video memory (default: enabled)")));
+                       _("Use high resolution lightmaps, which will look pretty but use up some extra video memory")));
                        e.applyButton = effectsApplyButton;
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_deluxemapping", _("Deluxe mapping"),
-                       _("Use per-pixel lighting effects (default: enabled)")));
+                       _("Use per-pixel lighting effects")));
                        setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_gloss", _("Gloss"),
-                       _("Enable the use of glossmaps on textures supporting it (default: enabled)")));
+                       _("Enable the use of glossmaps on textures supporting it")));
                        setDependentAND3(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0, "r_glsl_deluxemapping", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_offsetmapping", _("Offset mapping"),
-                       _("Offset mapping effect that will make textures with bumpmaps appear like they \"pop out\" of the flat 2D surface (default: disabled)")));
+                       _("Offset mapping effect that will make textures with bumpmaps appear like they \"pop out\" of the flat 2D surface")));
                        setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping"),
-                       _("Higher quality offset mapping, which also has a huge impact on performance (default: disabled)")));
+                       _("Higher quality offset mapping, which also has a huge impact on performance")));
                        setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_water", _("Reflections:"),
-                       _("Reflection and refraction quality, has a huge impact on performance on maps with reflecting surfaces (default: disabled)")));
+                       _("Reflection and refraction quality, has a huge impact on performance on maps with reflecting surfaces")));
                        setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_water_resolutionmultiplier",
-                       _("Resolution of reflections/refractions (default: good)")));
+                       _("Resolution of reflections/refractions")));
                        e.addValue(e, _("Blurred"), "0.25");
                        e.addValue(e, ZCTX(_("REFL^Good")), "0.5");
                        e.addValue(e, _("Sharp"), "1");
@@ -161,7 +161,7 @@ void XonoticEffectsSettingsTab_fill(entity me)
                        setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "cl_decals", _("Decals"),
-                       _("Enable decals (bullet holes and blood) (default: enabled)")));
+                       _("Enable decals (bullet holes and blood)")));
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models")));
                        setDependent(e, "cl_decals", 1, 1);
        me.TR(me);
@@ -169,14 +169,14 @@ void XonoticEffectsSettingsTab_fill(entity me)
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:")));
                        setDependent(e, "cl_decals", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(200, 500, 20, "r_drawdecals_drawdistance",
-                       _("Decals further away than this will not be drawn (default: 300)")));
+                       _("Decals further away than this will not be drawn")));
                        setDependent(e, "cl_decals", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:")));
                        setDependent(e, "cl_decals", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 20, 1, "cl_decals_fadetime",
-                       _("Time in seconds before decals fade away (default: 2)")));
+                       _("Time in seconds before decals fade away")));
                        setDependent(e, "cl_decals", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
@@ -189,42 +189,42 @@ void XonoticEffectsSettingsTab_fill(entity me)
 
        me.gotoRC(me, 1.25, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticRadioButton_T(1, "r_coronas", "0", _("No dynamic lighting"),
-                       _("Enable corona flares around certain lights (default: enabled)")));
+                       _("Enable corona flares around certain lights")));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticRadioButton_T(1, "gl_flashblend", string_null, _("Fake corona lighting"),
-                       _("Enable faster but uglier dynamic lights by rendering bright coronas instead of real dynamic lights (default: disabled)")));
+                       _("Enable faster but uglier dynamic lights by rendering bright coronas instead of real dynamic lights")));
                makeMulti(e, "r_coronas");
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticRadioButton_T(1, "r_shadow_realtime_dlight", string_null, _("Realtime dynamic lighting"),
-                       _("Enable rendering of dynamic lights such as explosions and rocket lights (default: enabled)")));
+                       _("Enable rendering of dynamic lights such as explosions and rocket lights")));
                makeMulti(e, "r_coronas");
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_dlight_shadows", _("Shadows"),
-                       _("Enable rendering of shadows from dynamic lights (default: disabled)")));
+                       _("Enable rendering of shadows from dynamic lights")));
                        setDependent(e, "r_shadow_realtime_dlight", 1, 1);
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_world", _("Realtime world lighting"),
-                       _("Enable rendering of full realtime world lighting on maps that support it. Note that this might have a big impact on performance. (default: disabled)")));
+                       _("Enable rendering of full realtime world lighting on maps that support it. Note that this might have a big impact on performance.")));
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_world_shadows", _("Shadows"),
-                       _("Enable rendering of shadows from realtime world lights (default: disabled)")));
+                       _("Enable rendering of shadows from realtime world lights")));
                        setDependent(e, "r_shadow_realtime_world", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "r_shadow_usenormalmap", _("Use normal maps"),
-                       _("Enable use of directional shading on textures (default: enabled)")));
+                       _("Enable use of directional shading on textures")));
                        setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1);
                me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", _("Soft shadows")));
                        setDependentWeird(e, someShadowCvarIsEnabled);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "r_coronas_occlusionquery", _("Fade corona according to visibility"),
-                       _("Fade coronas according to visibility (default: enabled)")));
+                       _("Fade coronas according to visibility")));
                        setDependent(e, "r_coronas", 1, 1);
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_bloom", _("Bloom"),
-                       _("Enable bloom effect, which brightens the neighboring pixels of very bright pixels. Has a big impact on performance. (default: disabled)")));
+                       _("Enable bloom effect, which brightens the neighboring pixels of very bright pixels. Has a big impact on performance.")));
                me.TD(me, 1, 2, e = makeXonoticCheckBoxEx_T(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"),
-                       _("Enables special postprocessing effects for when damaged or under water or using a powerup (default: disabled)")));
+                       _("Enables special postprocessing effects for when damaged or under water or using a powerup")));
                        makeMulti(e, "hud_powerup");
                        setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
@@ -246,14 +246,14 @@ void XonoticEffectsSettingsTab_fill(entity me)
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Quality:")));
                        setDependent(e, "cl_particles", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 3.0, 0.25, "cl_particles_quality",
-                       _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1.0)")));
+                       _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance")));
                        setDependent(e, "cl_particles", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:")));
                        setDependent(e, "cl_particles", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(200, 3000, 200, "r_drawparticles_drawdistance",
-                       _("Particles further away than this will not be drawn (default: 1000)")));
+                       _("Particles further away than this will not be drawn")));
                        setDependent(e, "cl_particles", 1, 1);
 
        me.gotoRC(me, me.rows - 1, 0);
index 2f5d795867844c5ab011970bf2bb4c32edc7a145..c1caddd7d4def04098368961477a35ba6eaa1e90 100644 (file)
@@ -69,7 +69,7 @@ void XonoticGameViewSettingsTab_fill(entity me)
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
                me.TD(me, 1, 2, e = makeXonoticSlider_T(60, 130, 5, "fov",
-                       _("Field of vision in degrees (default: 100)")));
+                       _("Field of vision in degrees")));
        me.TR(me);
        me.TR(me);
                //me.TDempty(me, 0.2);
index fc6521c4d2b9a7bd03e9b567ceecb9dd6f9247d2..27d6d4a82ec3a143f93ececce635ac37fba1892e 100644 (file)
@@ -72,7 +72,7 @@ void XonoticUserSettingsTab_fill(entity me)
 
        me.gotoRC(me, 11.5, 3.25); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 2.5, e = makeXonoticCheckBox_T(0, "cl_gentle", _("Disable gore effects and harsh language"),
-                       _("Replace blood and gibs with content that does not have any gore effects (default: disabled)")));
+                       _("Replace blood and gibs with content that does not have any gore effects")));
                        e.applyButton = userApplyButton;
 
        me.gotoRC(me, me.rows - 1, 0);
index 8ee51fde97405b4a424ff79f699c3fd6ded25684..0e524b6e23852cedf80e6c5c3e66e3841ac430ef 100644 (file)
@@ -59,18 +59,18 @@ void XonoticVideoSettingsTab_fill(entity me)
                me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen")));
                        e.applyButton = videoApplyButton;
                me.TD(me, 1, 2, e = makeXonoticCheckBox_T(0, "vid_vsync", _("Vertical Synchronization"),
-                       _("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate (default: disabled)")));
+                       _("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate")));
 
        me.TR(me);
                if(cvar("developer"))
                {
                        me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "v_flipped", _("Flip view horizontally"),
-                               _("Poor man's left handed mode (default: off)")));
+                               _("Poor man's left handed mode")));
                }
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("gl_texture_anisotropy",
-                       _("Anisotropic filtering quality (default: 1x)")));
+                       _("Anisotropic filtering quality")));
                        e.addValue(e, ZCTX(_("ANISO^Disabled")), "1");
                        e.addValue(e, _("2x"), "2");
                        e.addValue(e, _("4x"), "4");
@@ -81,7 +81,7 @@ void XonoticVideoSettingsTab_fill(entity me)
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Antialiasing:")));
                        setDependent(e, "r_viewfbo", 0, 0);
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("vid_samples",
-                       _("Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot (default: disabled)")));
+                       _("Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot")));
                        e.addValue(e, ZCTX(_("AA^Disabled")), "1");
                        e.addValue(e, _("2x"), "2");
                        e.addValue(e, _("4x"), "4");
@@ -96,7 +96,7 @@ void XonoticVideoSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_depthfirst",
-                       _("Eliminate overdraw by rendering a depth-only version of the scene before the normal rendering starts (default: disabled)")));
+                       _("Eliminate overdraw by rendering a depth-only version of the scene before the normal rendering starts")));
                        e.addValue(e, ZCTX(_("DF^Disabled")), "0");
                        e.addValue(e, ZCTX(_("DF^World")), "1");
                        e.addValue(e, ZCTX(_("DF^All")), "2");
@@ -107,60 +107,60 @@ void XonoticVideoSettingsTab_fill(entity me)
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", ZCTX(_("VBO^Off"))));
                me.TD(me, 1, 1.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)"),
-                       _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)")));
+                       _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering")));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "2", _("Vertices"),
-                       _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)")));
+                       _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering")));
                me.TD(me, 1, 1.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "1", _("Vertices and Triangles"),
-                       _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)")));
+                       _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering")));
 
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Brightness:")));
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.0, 0.5, 0.02, "v_brightness",
-                       _("Brightness of black (default: 0)")));
+                       _("Brightness of black")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast:")));
                me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 3.0, 0.05, "v_contrast",
-                       _("Brightness of white (default: 1)")));
+                       _("Brightness of white")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:")));
                        setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "v_gamma",
-                       _("Inverse gamma correction value, a brightness effect that does not affect white or black (default: 1.125)")));
+                       _("Inverse gamma correction value, a brightness effect that does not affect white or black")));
                        setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:")));
                        setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 5.0, 0.1, "v_contrastboost",
-                       _("By how much to multiply the contrast in dark areas (default: 1)")));
+                       _("By how much to multiply the contrast in dark areas")));
                        setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:")));
                        setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_glsl_saturation",
-                       _("Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control (default: 1)")));
+                       _("Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control")));
                        setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("LIT^Ambient:"))));
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 20.0, 0.25, "r_ambient",
-                       _("Ambient lighting, if set too high it tends to make light on maps look dull and flat (default: 4)")));
+                       _("Ambient lighting, if set too high it tends to make light on maps look dull and flat")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Intensity:")));
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_hdr_scenebrightness",
-                       _("Global rendering brightness (default: 1)")));
+                       _("Global rendering brightness")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "gl_finish", _("Wait for GPU to finish each frame"),
-                       _("Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines (default: disabled)")));
+                       _("Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines")));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)")));
                        e.applyButton = videoApplyButton;
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "v_glslgamma", _("Use GLSL to handle color control"),
-                       _("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot (default: disabled)")));
+                       _("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot")));
                        setDependent(e, "vid_gl20", 1, 1);
        if(cvar("developer"))
        {
index 3a89b00a7b21a5cf102a93d951c2e685e8b4e120..72639fcb1ca93ddd504d34c262d3a5d8854ace78 100644 (file)
@@ -10,7 +10,7 @@ entity makeXonoticParticlesSlider()
 void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me)
 {
        me.configureXonoticTextSlider(me, "cl_particles_quality",
-               _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1)"));
+               _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance"));
        if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")),      "0.25 250 0"); }
        me.addValue(me,                         ZCTX(_("PART^Low")),      "0.5 500 0");
        me.addValue(me,                         ZCTX(_("PART^Medium")),   "0.75 750 0");
index c6b7c1e8cc7b5cbaaace86d9bb4cd5fedd8b4e06..c0b03af57df5afea037fda43c2953ad794ed596b 100644 (file)
@@ -10,7 +10,7 @@ entity makeXonoticPicmipSlider()
 void XonoticPicmipSlider_configureXonoticPicmipSlider(entity me)
 {
        me.configureXonoticTextSlider(me, "gl_picmip",
-               _("Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry. (default: good)"));
+               _("Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry."));
        me.autofix(me);
        me.have_s3tc = GL_Have_TextureCompression();
 }
index fba558503d4b0cfc7a1d33d07ea93a6ea05da1c9..a2f917fafcaee15b204ce9cc80eb1455ce89dc38 100644 (file)
@@ -325,9 +325,6 @@ string autocvar_sv_motd;
 bool autocvar_sv_precacheplayermodels;
 //float autocvar_sv_precacheweapons; // WEAPONTODO?
 bool autocvar_sv_q3acompat_machineshotgunswap;
-bool autocvar_sv_ready_restart;
-bool autocvar_sv_ready_restart_after_countdown;
-bool autocvar_sv_ready_restart_repeatable;
 bool autocvar_sv_servermodelsonly;
 int autocvar_sv_spectate;
 float autocvar_sv_spectator_speed_multiplier;
index 3333c04e49180286b6ef8806c91aa410baf0de1e..16908fcd3c90b740098d6c62c286f516ec099a7a 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "../common/triggers/func/conveyor.qh"
 #include "../common/triggers/teleporters.qh"
+#include "../common/triggers/target/spawnpoint.qh"
 
 #include "../common/vehicles/all.qh"
 
@@ -352,6 +353,10 @@ void PutObserverInServer(entity this)
        this.weapons = '0 0 0';
        this.drawonlytoclient = this;
 
+       this.viewloc = NULL;
+
+       //this.spawnpoint_targ = NULL; // keep it so they can return to where they were?
+
        this.weaponmodel = "";
        for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
@@ -577,14 +582,15 @@ void PutPlayerInServer(entity this)
        this.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot_spawn;
        this.pauserotfuel_finished = time + autocvar_g_balance_pause_fuel_rot_spawn;
        this.pauseregen_finished = time + autocvar_g_balance_pause_health_regen_spawn;
-       // extend the pause of rotting if client was reset at the beginning of the countdown
-       if (!autocvar_sv_ready_restart_after_countdown && time < game_starttime) { // TODO why is this cvar NOTted?
+       if (!sv_ready_restart_after_countdown && time < game_starttime)
+       {
                float f = game_starttime - time;
                this.spawnshieldtime += f;
                this.pauserotarmor_finished += f;
                this.pauserothealth_finished += f;
                this.pauseregen_finished += f;
        }
+
        this.damageforcescale = 2;
        this.death_time = 0;
        this.respawn_flags = 0;
@@ -635,6 +641,8 @@ void PutPlayerInServer(entity this)
 
        this.viewloc = NULL;
 
+       this.spawnpoint_targ = NULL;
+
        this.crouch = false;
        this.view_ofs = STAT(PL_VIEW_OFS, this);
        setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
index 09a308ad5c64d6a1001fb31754d2a8d0721f89e0..088925f100f2f3f47499a4be5a72bcac7861bf15 100644 (file)
@@ -239,9 +239,9 @@ void ClientCommand_ready(entity caller, float request)  // todo: anti-spam for t
                {
                        if (IS_CLIENT(caller))
                        {
-                               if (warmup_stage || autocvar_sv_ready_restart || g_race_qualifying == 2)
+                               if (warmup_stage || sv_ready_restart || g_race_qualifying == 2)
                                {
-                                       if (!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
+                                       if (!readyrestart_happened || sv_ready_restart_repeatable)
                                        {
                                                if (time < game_starttime) // game is already restarting
                                                        return;
index c9a5550ba81562b7fb36075200ab21aed39f6b68..7ed7d6b4eae3435478c111dde86799b25afdf77a 100644 (file)
@@ -452,7 +452,7 @@ void ReadyRestart_force()
        }
 
        // initiate the restart-countdown-announcer entity
-       if (autocvar_sv_ready_restart_after_countdown)
+       if (sv_ready_restart_after_countdown)
        {
                entity restart_timer = new_pure(restart_timer);
                setthink(restart_timer, ReadyRestart_think);
@@ -464,8 +464,8 @@ void ReadyRestart_force()
        {
                FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { CS(it).allowed_timeouts = autocvar_sv_timeout_number; });
        }
-    // reset map immediately if this cvar is not set
-    if (!autocvar_sv_ready_restart_after_countdown) reset_map(true);
+
+       if (!sv_ready_restart_after_countdown) reset_map(true);
        if (autocvar_sv_eventlog) GameLogEcho(":restart");
 }
 
@@ -476,7 +476,7 @@ void ReadyRestart()
 
        // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
        // Otherwise scores could be manipulated during the countdown.
-       if (!autocvar_sv_ready_restart_after_countdown) Score_ClearAll();
+       if (!sv_ready_restart_after_countdown) Score_ClearAll();
        ReadyRestart_force();
 }
 
index e9cf6ee286a7d8831806504435737977436d8e08..df94c778112f0ec6cf5bf19508afb4de55c0997c 100644 (file)
@@ -13,6 +13,10 @@ float g_warmup_allow_timeout;
 float warmup_stage;
 float g_jetpack;
 
+bool sv_ready_restart;
+bool sv_ready_restart_after_countdown;
+bool sv_ready_restart_repeatable;
+
 float sv_clones;
 float sv_foginterval;
 
index 1dd3526dd48c435eaa00ade8bc1a0047b767079a..8a32b9b5bddf8c9ff71e031f6857fecbc86cb812 100644 (file)
@@ -235,6 +235,9 @@ void readlevelcvars()
        sv_maxidle_slots_countbots = cvar("sv_maxidle_slots_countbots");
        sv_autotaunt = cvar("sv_autotaunt");
        sv_taunt = cvar("sv_taunt");
+       sv_ready_restart = cvar("sv_ready_restart");
+       sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown");
+       sv_ready_restart_repeatable = cvar("sv_ready_restart_repeatable");
 
        warmup_stage = cvar("g_warmup");
        warmup_limit = cvar("g_warmup_limit");
index 50861c32f7d005bf40435df9449128e62eb1d05e..70e2669184bb30d3e852f9e7c7bed02478c470a1 100644 (file)
@@ -591,8 +591,9 @@ MUTATOR_HOOKFUNCTION(as, CheckRules_World)
 
 MUTATOR_HOOKFUNCTION(as, ReadLevelCvars)
 {
-       // no assault warmups
+       // incompatible
        warmup_stage = 0;
+       sv_ready_restart_after_countdown = 0;
 }
 
 MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
index cd393b64196a1cbab9f0128623f3ef8be7adc612..b6bbc3f51ca217dd5238ade151b31c2fa79040ca 100644 (file)
@@ -341,6 +341,9 @@ entity SelectSpawnPoint(entity this, bool anypoint)
        if (spot)
                return spot;
 
+       if(this.spawnpoint_targ)
+               return this.spawnpoint_targ;
+
        if(anypoint || autocvar_g_spawn_useallspawns)
                teamcheck = -1;
        else if(have_team_spawns > 0)
index 2f6fcb68d7213cbafc508343d377da932944ad0a..809db42710815711c3da5177035c0a1cc1affe2c 100644 (file)
@@ -418,7 +418,7 @@ void weapon_thinkf(entity actor, .entity weaponentity, WFRAME fr, float t, void(
 
 bool forbidWeaponUse(entity player)
 {
-       if (time < game_starttime && !autocvar_sv_ready_restart_after_countdown) return true;
+       if (time < game_starttime && !sv_ready_restart_after_countdown) return true;
        if (player.player_blocked) return true;
        if (game_stopped) return true;
        if (STAT(FROZEN, player)) return true;
@@ -472,6 +472,8 @@ void W_WeaponFrame(Player actor, .entity weaponentity)
 
        if (this.m_switchweapon == WEP_Null)
        {
+               if (this.state != WS_CLEAR)
+                       w_ready(this.m_weapon, actor, weaponentity, button_atck | (button_atck2 << 1));
                this.m_weapon = WEP_Null;
                this.m_switchingweapon = WEP_Null;
                this.state = WS_CLEAR;