]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
dryfire.wav sound when out of ammo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index aeee9cecbac843cc4e6203e29de494a0b8e41374..59428f65dbca241c03f7b330440cdd8cf75fce98 100644 (file)
@@ -100,9 +100,9 @@ string GetAdvancedDeathReports(entity enPlayer) // Extra fragmessage information
 
        if(cvar("sv_fragmessage_information_ping")) {
                if(clienttype(enPlayer) == CLIENTTYPE_BOT) // Bots have no ping
-                       strMessage = strcat(strMessage, "\n^7(^2Bot");
+                       strMessage = strcat(strMessage, " ^7(^2Bot");
                else
-                       strMessage = strcat(strMessage, "\n^7(Ping ", strPlayerPingColor, ftos(nPlayerPing), "ms");
+                       strMessage = strcat(strMessage, " ^7(Ping ", strPlayerPingColor, ftos(nPlayerPing), "ms");
                if(cvar("sv_fragmessage_information_handicap"))
                        if(cvar("sv_fragmessage_information_handicap") == 2)
                                if(nPlayerHandicap <= 1)
@@ -989,7 +989,7 @@ void readplayerstartcvars()
        if (g_weaponarena)
        {
                start_weapons = g_weaponarena;
-               if (g_weaponarena & (WEPBIT_GRENADE_LAUNCHER | WEPBIT_HAGAR | WEPBIT_ROCKET_LAUNCHER))
+               if (g_weaponarena & (WEPBIT_GRENADE_LAUNCHER | WEPBIT_MINE_LAYER | WEPBIT_HAGAR | WEPBIT_ROCKET_LAUNCHER))
                        start_ammo_rockets = 999;
                if (g_weaponarena & WEPBIT_SHOTGUN)
                        start_ammo_shells = 999;
@@ -1668,6 +1668,7 @@ void precache()
     precache_sound ("weapons/weapon_switch.wav");
     precache_sound ("weapons/weaponpickup.wav");
     precache_sound ("weapons/unavailable.wav");
+    precache_sound ("weapons/dryfire.wav");
     if (g_grappling_hook)
     {
         precache_sound ("weapons/hook_fire.wav"); // hook
@@ -2330,9 +2331,9 @@ void write_recordmarker(entity pl, float tstart, float dt)
                  " ", ftos(tstart), " ", ftos(dt), "\n"));
 }
 
-vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter)
+vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter, float algn)
 {
-       switch(self.owner.cvar_cl_gunalign)
+       switch(algn)
        {
                case 1: // right
                        break;
@@ -2372,7 +2373,7 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter
        return vecs;
 }
 
-vector shotorg_adjust(vector vecs, float y_is_right, float visual)
+vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float algn)
 {
        string s;
        vector v;
@@ -2381,7 +2382,7 @@ vector shotorg_adjust(vector vecs, float y_is_right, float visual)
        {
                if (visual)
                {
-                       vecs = shotorg_adjustfromclient(vecs, y_is_right, TRUE);
+                       vecs = shotorg_adjustfromclient(vecs, y_is_right, TRUE, algn);
                }
                else
                {
@@ -2393,7 +2394,7 @@ vector shotorg_adjust(vector vecs, float y_is_right, float visual)
        {
                if (visual)
                {
-                       vecs = shotorg_adjustfromclient(vecs, y_is_right, TRUE);
+                       vecs = shotorg_adjustfromclient(vecs, y_is_right, TRUE, algn);
                }
                else
                {
@@ -2413,11 +2414,15 @@ vector shotorg_adjust(vector vecs, float y_is_right, float visual)
        }
        else if (cvar("g_shootfromclient"))
        {
-               vecs = shotorg_adjustfromclient(vecs, y_is_right, (cvar("g_shootfromclient") >= 2));
+               vecs = shotorg_adjustfromclient(vecs, y_is_right, (cvar("g_shootfromclient") >= 2), algn);
        }
        return vecs;
 }
 
+vector shotorg_adjust(vector vecs, float y_is_right, float visual)
+{
+       return shotorg_adjust_values(vecs, y_is_right, visual, self.owner.cvar_cl_gunalign);
+}
 
 
 void attach_sameorigin(entity e, entity to, string tag)