]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into mirio/balance
authorMirio <opivy@hotmail.de>
Sat, 5 Mar 2016 13:36:10 +0000 (14:36 +0100)
committerMirio <opivy@hotmail.de>
Sat, 5 Mar 2016 13:36:10 +0000 (14:36 +0100)
.gitlab-ci.yml
qcsrc/client/autocvars.qh
qcsrc/client/main.qc
qcsrc/common/items/item/jetpack.qc
qcsrc/common/items/item/powerup.qc
qcsrc/common/mutators/mutator/damagetext/damagetext.qc
qcsrc/common/mutators/mutator/new_toys/new_toys.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/lib/linkedlist.qh
qcsrc/server/cl_client.qc
qcsrc/server/g_world.qc

index a2eea23bc2c8bad011ce33c6d5507f0815349dff..613f231ea641a29394286dc877c57edadc99401e 100644 (file)
@@ -27,7 +27,7 @@ test_sv_game:
   script:
     - wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3
     - make
-    - EXPECT=0920bfe86d0a02684fd67044233a092e
+    - EXPECT=f75e1bf926a9d7bfe27765f5cf8cef20
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 49cafb896a18fcc122d751fdcda6180c657ff802..cbee59e90ef076e1af9430aae53677f51a5c31b1 100644 (file)
@@ -72,6 +72,8 @@ bool autocvar_cl_spawn_event_particles;
 bool autocvar_cl_spawn_event_sound = 1;
 // float autocvar_cl_spawn_point_model;
 bool autocvar_cl_spawn_point_particles;
+float autocvar_cl_spawn_point_dist_min = 1200;
+float autocvar_cl_spawn_point_dist_max = 1600;
 bool autocvar_cl_spawnzoom = 1;
 float autocvar_cl_spawnzoom_speed = 1;
 float autocvar_cl_spawnzoom_factor = 2;
index 14279816efdee0f62642a3cfe2fb0fb370fad76b..5984aba93348f88c0423cff796d4bc0dd5b7f0ef 100644 (file)
@@ -676,6 +676,22 @@ void Spawn_Draw(entity this)
        __pointparticles(this.cnt, this.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
 }
 
+void Spawn_PreDraw(entity this)
+{
+       float alph;
+       vector org = getpropertyvec(VF_ORIGIN);
+       if(this.fade_start)
+               alph = bound(0, (this.fade_end - vlen(org - this.origin - 0.5 * (this.mins + this.maxs))) / (this.fade_end - this.fade_start), 1);
+       else
+               alph = 1;
+       //printf("%v <-> %v\n", view_origin, this.origin + 0.5 * (this.mins + this.maxs));
+       this.alpha = alph;
+       if(alph <= 0)
+               this.drawmask = 0;
+       else
+               this.drawmask = MASK_NORMAL;
+}
+
 NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new)
 {
        float teamnum = (ReadByte() - 1);
@@ -716,6 +732,9 @@ NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new)
                        else { this.cnt = particleeffectnum(EFFECT_SPAWNPOINT_NEUTRAL); }
 
                        this.draw = Spawn_Draw;
+                       setpredraw(this, Spawn_PreDraw);
+                       this.fade_start = autocvar_cl_spawn_point_dist_min;
+                       this.fade_end = autocvar_cl_spawn_point_dist_max;
                }
        //}
 
index 7ccbe8fa3fdbf622290ed3864b538cae91fe2f1b..7fd29e299f57f0034fde2b701fdfe949666f4c34 100644 (file)
@@ -5,6 +5,10 @@
 #include "ammo.qh"
 #include "powerup.qh"
 
+#ifndef SVQC
+.int m_itemid;
+#endif
+
 #ifndef MENUQC
 MODEL(Jetpack_ITEM, Item_Model("g_jetpack.md3"));
 #endif
@@ -12,6 +16,7 @@ MODEL(Jetpack_ITEM, Item_Model("g_jetpack.md3"));
 REGISTER_ITEM(Jetpack, Powerup) {
 #ifndef MENUQC
     this.m_model                =   MDL_Jetpack_ITEM;
+    this.m_itemid               =   IT_JETPACK;
 #endif
     this.m_name                 =   "Jet pack";
     this.m_icon                 =   "jetpack";
@@ -20,7 +25,6 @@ REGISTER_ITEM(Jetpack, Powerup) {
     this.m_waypointblink        =   2;
 #ifdef SVQC
     this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
-    this.m_itemid               =   IT_JETPACK;
     this.m_pickupevalfunc       =   commodity_pickupevalfunc;
 #endif
 }
index 7deba67df50bb48c9ddedeed3a455c9bab126c0e..375f958a16ddb798c93ab5de7fdfe48f404dabbd 100644 (file)
@@ -1,9 +1,5 @@
 #include "powerup.qh"
 
-#ifndef SVQC
-.int m_itemid;
-#endif
-
 #ifndef MENUQC
 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
 SOUND(Strength, "misc/powerup");
index 6a33ab34e6268230983db5b642d910a7c8dd7663..866ffeb4c743e155c9f89c8b158d72a4d2d2e98a 100644 (file)
@@ -98,8 +98,8 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
         ) {
             msg_entity = it;
             WriteHeader(MSG_ONE, damagetext);
-            WriteShort(MSG_ONE, health);
-            WriteShort(MSG_ONE, armor);
+            WriteShort(MSG_ONE, rint(health));
+            WriteShort(MSG_ONE, rint(armor));
             WriteEntity(MSG_ONE, hit);
             WriteCoord(MSG_ONE, location.x);
             WriteCoord(MSG_ONE, location.y);
index ab0567d3a3fb54d8d3ff7f9314135a43aaeae6c0..014c22508649375e17a6251ff9197d8cc4273ed0 100644 (file)
@@ -122,7 +122,6 @@ bool nt_IsNewToy(int w)
                case WEP_MINE_LAYER.m_id:
                case WEP_HLAC.m_id:
                case WEP_RIFLE.m_id:
-               case WEP_SHOCKWAVE.m_id:
                        return true;
                default:
                        return false;
index d76095ec8bf60504366c1ee40f694b3d8219991a..96743b75e73e6570054a34b8f5e3b3cd919d299d 100644 (file)
@@ -322,6 +322,8 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
 #include <lib/csqcmodel/interpolate.qh>
 #include <lib/warpzone/common.qh>
 
+float autocvar_cl_grapplehook_alpha = 1;
+
 void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
 
 entityclass(Hook);
@@ -419,7 +421,7 @@ void Draw_GrapplingHook(entity this)
        {
                default:
                case NET_ENT_CLIENT_HOOK:
-                       intensity = 1;
+                       intensity = autocvar_cl_grapplehook_alpha;
                        offset = 0;
                        switch(t)
                        {
index a8e4aaa090a0ac9ec09a9fad0c1a047ec86337a4..07d99b4f1226f73d843d0304e302d2439d6947e3 100644 (file)
@@ -67,7 +67,7 @@ entity LL_POP(LinkedList this)
 #define LL_DELETE_2(this, dtor) \
        MACRO_BEGIN \
        { \
-               LL_CLEAR(this, dtor); \
+               LL_CLEAR_2(this, dtor); \
                remove(this); \
                this = NULL; \
        } MACRO_END
index e683a4e2438e50289eb595f1dfd9995114608301..de2603437e253f69e2c2322706a55ba846f8c92f 100644 (file)
@@ -1244,7 +1244,9 @@ void ClientDisconnect ()
 
        self.playerid = 0;
        ReadyCount();
-       VoteCount(false);
+       if(vote_called)
+       if(IS_REAL_CLIENT(self))
+               VoteCount(false);
 
        // free cvars
        GetCvars(-1);
index 5fc7b9f99042cc71b31e82f02c84c5c7a7b80fb8..b168efbdf39ee067d275f354bdea731dbf9e1d8f 100644 (file)
@@ -269,7 +269,9 @@ void cvar_changes_init()
                BADCVAR("g_nexball");
                BADCVAR("g_onslaught");
                BADCVAR("g_race");
+               BADCVAR("g_race_laps_limit");
                BADCVAR("g_race_qualifying_timelimit");
+               BADCVAR("g_race_qualifying_timelimit_override");
                BADCVAR("g_tdm");
                BADCVAR("g_tdm_teams");
                BADCVAR("leadlimit");
@@ -300,47 +302,52 @@ void cvar_changes_init()
 
                // now check if the changes are actually gameplay relevant
 
-               // does nothing visible
+               // does nothing gameplay relevant
                BADCVAR("captureleadlimit_override");
+               BADCVAR("gameversion");
+               BADCVAR("g_allow_oldvortexbeam");
                BADCVAR("g_balance_kill_delay");
-               BADCVAR("g_ca_point_limit");
+               BADCVAR("g_campcheck_distance");
                BADCVAR("g_ca_point_leadlimit");
+               BADCVAR("g_ca_point_limit");
                BADCVAR("g_ctf_captimerecord_always");
                BADCVAR("g_ctf_flag_glowtrails");
                BADCVAR("g_ctf_flag_pickup_verbosename");
                BADCVAR("g_domination_point_leadlimit");
                BADCVAR("g_forced_respawn");
-               BADCVAR("g_freezetag_point_limit");
                BADCVAR("g_freezetag_point_leadlimit");
-               BADCVAR("g_keyhunt_point_leadlimit");
-               BADPREFIX("g_mod_");
+               BADCVAR("g_freezetag_point_limit");
+               BADCVAR("g_hats");
                BADCVAR("g_invasion_point_limit");
+               BADCVAR("g_keyhunt_point_leadlimit");
                BADCVAR("g_nexball_goalleadlimit");
-               BADCVAR("g_tdm_point_limit");
                BADCVAR("g_tdm_point_leadlimit");
+               BADCVAR("g_tdm_point_limit");
                BADCVAR("leadlimit_and_fraglimit");
                BADCVAR("leadlimit_override");
                BADCVAR("pausable");
                BADCVAR("sv_allow_fullbright");
                BADCVAR("sv_checkforpacketsduringsleep");
+               BADCVAR("sv_intermission_cdtrack");
+               BADCVAR("sv_minigames");
+               BADCVAR("sv_namechangetimer");
+               BADCVAR("sv_precacheplayermodels");
                BADCVAR("sv_timeout");
-               BADPREFIX("sv_timeout_");
                BADPREFIX("crypto_");
+               BADPREFIX("gameversion_");
                BADPREFIX("g_chat_");
                BADPREFIX("g_ctf_captimerecord_");
                BADPREFIX("g_maplist_votable_");
+               BADPREFIX("g_mod_");
                BADPREFIX("net_");
                BADPREFIX("prvm_");
                BADPREFIX("skill_");
                BADPREFIX("sv_cullentities_");
                BADPREFIX("sv_maxidle_");
+               BADPREFIX("sv_minigames_");
+               BADPREFIX("sv_timeout_");
                BADPREFIX("sv_vote_");
                BADPREFIX("timelimit_");
-               BADCVAR("gameversion");
-               BADPREFIX("gameversion_");
-               BADCVAR("sv_minigames");
-               BADPREFIX("sv_minigames_");
-               BADCVAR("sv_namechangetimer");
 
                // allowed changes to server admins (please sync this to server.cfg)
                // vi commands:
@@ -385,7 +392,9 @@ void cvar_changes_init()
                BADCVAR("g_mirrordamage");
                BADCVAR("g_nexball_goallimit");
                BADCVAR("g_powerups");
+               BADCVAR("g_spawnshieldtime");
                BADCVAR("g_start_delay");
+               BADCVAR("g_superspectate");
                BADCVAR("g_tdm_teams_override");
                BADCVAR("g_warmup");
                BADCVAR("g_weapon_stay"); BADPRESUFFIX("g_", "_weapon_stay");
@@ -423,7 +432,6 @@ void cvar_changes_init()
                BADCVAR("sv_vote_simple_majority_factor");
                BADCVAR("teamplay_mode");
                BADCVAR("timelimit_override");
-               BADCVAR("g_spawnshieldtime");
                BADPREFIX("g_warmup_");
                BADPREFIX("sv_ready_restart_");