From 6d29c38961d30195ae9b34b17ac3fac633382185 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Wed, 19 Feb 2014 23:15:33 -0500 Subject: [PATCH] Remove the separate function for arc init --- qcsrc/common/weapons/w_arc.qc | 18 ++++++++---------- qcsrc/server/g_world.qc | 1 - 2 files changed, 8 insertions(+), 11 deletions(-) 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; -- 2.39.2