From: Rudolf Polzer Date: Thu, 19 Jan 2012 18:18:13 +0000 (+0100) Subject: don't show porto preview beams when secondary exists X-Git-Tag: xonotic-v0.6.0~111^2~5 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=91f4389758be17f1d9963da767a1c5d366b6f673 don't show porto preview beams when secondary exists --- diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index 2a1c9e67c..9bd8e8c8a 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -275,3 +275,5 @@ float uid2name_dialog; .float csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) + +float g_balance_porto_secondary; diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 81c1369a0..d09f5ebb2 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -881,6 +881,7 @@ void Ent_Init() hagar_maxrockets = ReadByte(); g_trueaim_minrange = ReadCoord(); + g_balance_porto_secondary = ReadByte(); if(!postinit) PostInit(); diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index afccaf45d..82cff7823 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -12,6 +12,8 @@ void Porto_Draw() if(activeweapon != WEP_PORTO || spectatee_status || gametype == MAPINFO_TYPE_NEXBALL) return; + if(g_balance_porto_secondary) + return; if(intermission == 1) return; if(intermission == 2) diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index f4666eb13..627e7529a 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -967,6 +967,7 @@ float ClientInit_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, autocvar_g_balance_minelayer_limit); // minelayer max mines WriteByte(MSG_ENTITY, autocvar_g_balance_hagar_secondary_load_max); // hagar max loadable rockets WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange); + WriteByte(MSG_ENTITY, autocvar_g_balance_porto_secondary); return TRUE; }