From: Rudolf Polzer Date: Sat, 11 Jun 2011 18:02:13 +0000 (+0200) Subject: switch the meanings of cl_gunalign 1/2 and 3/4 because of problems with old client... X-Git-Tag: xonotic-v0.5.0~211^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e687929db8b9b5742f44376e8d86c27ffae63418;p=xonotic%2Fxonotic-data.pk3dir.git switch the meanings of cl_gunalign 1/2 and 3/4 because of problems with old client on new server --- diff --git a/config_update.cfg b/config_update.cfg index 0c358c72a..529461de0 100644 --- a/config_update.cfg +++ b/config_update.cfg @@ -7,9 +7,12 @@ alias _update_configversion_1 "_update_configversion_2" // Updates for Nexuiz to Xonotic alias _update_configversion_2 "volume 1; cl_gunalign 1; _update_configversion_3" +// Updates for gunalign fix +alias _update_configversion_3 "cl_gunalign 3; _update_configversion_4" + // place to put further updates -alias _update_configversion_3 "" +alias _update_configversion_4 "" _update_configversion_$g_configversion -set g_configversion 3 +set g_configversion 4 diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 149f28bd9..a0e4a44b0 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -909,7 +909,7 @@ r_shadow_realtime_world_lightmaps 1 seta r_ambient 4 cl_decals_fadetime 5 cl_decals_time 2 -seta cl_gunalign 1 "Gun alignment; 1 = right only, 2 = left only, 3 = center (if allowed by g_shootfromclient) or right, 4 = center (if allowed by g_shootfromclient) or left" +seta cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only" seta cl_nogibs 0 "reduce number of violence effects, or remove them totally" seta cl_particlegibs 0 "simpler gibs" seta cl_gibs_damageforcescale 3.5 "force to push around gibs" @@ -1901,7 +1901,7 @@ seta cl_vehicle_spiderbot_cross_alpha 0.6 seta cl_vehicle_spiderbot_cross_size 1 //cl_gunalign calculator -seta menu_cl_gunalign 1 "Gun alignment; 1 = right only, 2 = left only, 3 = center (if allowed by g_shootfromclient) or right, 4 = center (if allowed by g_shootfromclient) or left" +seta menu_cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only" alias _gunalign_01 "cl_gunalign 1" alias _gunalign_02 "cl_gunalign 2" alias _gunalign_03 "cl_gunalign 3" diff --git a/qcsrc/client/hook.qc b/qcsrc/client/hook.qc index c1a50c010..7ff5adeca 100644 --- a/qcsrc/client/hook.qc +++ b/qcsrc/client/hook.qc @@ -66,8 +66,8 @@ void Draw_GrapplingHook() InterpolateOrigin_Do(); s = autocvar_cl_gunalign; - if(s != 2 && s != 3 && s != 4) - s = 1; // default value + if(s != 1 && s != 2 && s != 4) + s = 3; // default value --s; switch(self.HookType) { diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c index 233b5e724..6557a1cd6 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c @@ -45,11 +45,11 @@ void XonoticWeaponsDialog_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "2", _("Left align"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align"))); setDependent(e, "r_drawviewmodel", 1, 1); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Center"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center"))); setDependent(e, "r_drawviewmodel", 1, 1); - me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Right align"))); + me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align"))); setDependent(e, "r_drawviewmodel", 1, 1); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_flipped", _("Flip view horizontally"))); diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index beb041cbb..dd6d73eff 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -338,8 +338,8 @@ void FireGrapplingHook (void) makevectors(self.v_angle); s = self.cvar_cl_gunalign; - if(s != 2 && s != 3 && s != 4) - s = 1; // default value + if(s != 1 && s != 2 && s != 4) + s = 3; // default value --s; vs = hook_shotorigin[s]; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 474f713ff..c2ee8ecf1 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -2623,15 +2623,16 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter { switch(algn) { - case 1: // right + default: + case 3: // right break; - case 2: // left + case 4: // left vecs_y = -vecs_y; break; default: - case 3: + case 1: if(allowcenter) // 2: allow center handedness { // center @@ -2644,7 +2645,7 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter } break; - case 4: + case 2: if(allowcenter) // 2: allow center handedness { // center