]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove the separate function for arc init
authorSamual Lenks <samual@xonotic.org>
Thu, 20 Feb 2014 04:15:33 +0000 (23:15 -0500)
committerSamual Lenks <samual@xonotic.org>
Thu, 20 Feb 2014 04:15:33 +0000 (23:15 -0500)
qcsrc/common/weapons/w_arc.qc
qcsrc/server/g_world.qc

index d75fc183e2e37e3259ccb46075a450229d3b3bdd..32f035c2e6033509150d49d9e7061400a3563c84 100644 (file)
@@ -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)
index 7d4c4f2a2851cbd188f8b3c994e6c48bde22211c..42c5bcf4e1d6976b9089a001dde7394308aa56f5 100644 (file)
@@ -652,7 +652,6 @@ void spawnfunc_worldspawn (void)
        InitGameplayMode();
        readlevelcvars();
        GrappleHookInit();
-       ArcInit();
 
        player_count = 0;
        bot_waypoints_for_items = autocvar_g_waypoints_for_items;