From: Samual Lenks Date: Thu, 20 Feb 2014 04:15:33 +0000 (-0500) Subject: Remove the separate function for arc init X-Git-Tag: xonotic-v0.8.0~152^2~67 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6d29c38961d30195ae9b34b17ac3fac633382185;p=xonotic%2Fxonotic-data.pk3dir.git Remove the separate function for arc init --- diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index d75fc183e..32f035c2e 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -492,6 +492,14 @@ float W_Arc(float req) precache_sound("weapons/arc_impact.wav"); //precache_sound("weapons/arc_impact_combo.wav"); //precache_sound("weapons/W_Arc_Beam_fire.wav"); + if(!arc_shotorigin[0]) + { + arc_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 1); + arc_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 2); + arc_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 3); + arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 4); + } + ARC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) return TRUE; } case WR_CHECKAMMO1: @@ -530,16 +538,6 @@ float W_Arc(float req) } return FALSE; } - -void ArcInit(void) -{ - WEP_ACTION(WEP_ARC, WR_INIT); - arc_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 1); - arc_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 2); - arc_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 3); - arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 4); - ARC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) -} #endif #ifdef CSQC float W_Arc(float req) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 7d4c4f2a2..42c5bcf4e 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -652,7 +652,6 @@ void spawnfunc_worldspawn (void) InitGameplayMode(); readlevelcvars(); GrappleHookInit(); - ArcInit(); player_count = 0; bot_waypoints_for_items = autocvar_g_waypoints_for_items;