]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix some warnings found by FTEQCC
authorMario <mario.mario@y7mail.com>
Tue, 19 May 2020 14:00:57 +0000 (00:00 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 19 May 2020 14:00:57 +0000 (00:00 +1000)
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/lib/map.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc

index c58fb2a675f5d191a5ba55d1ee385a0753321a37..a0bd8727a99d271004951553a1d1653f0213cd91 100644 (file)
@@ -863,7 +863,7 @@ void QuickMenu_Default(string target_submenu)
        {
                LOG_INFOF("Couldn't find submenu \"%s\"", target_submenu);
                if(prvm_language != "en")
-                       LOG_INFOF("^3Warning: submenu title must be in English", target_submenu);
+                       LOG_INFO("^3Warning: submenu title must be in English");
                QuickMenu_Buffer_Size = 0;
        }
 }
index f7253d8d8e9985c426adf353858332d0b478f6b4..473f9a7574a32c5cf54da9b0053db68461fd6a95 100644 (file)
@@ -17,12 +17,12 @@ METHOD(RacerAttack, wr_think, void(entity thiswep, entity actor, .entity weapone
         string tagname = (veh.cnt)
             ? (veh.cnt = 0, "tag_fire1")
             : (veh.cnt = 1, "tag_fire2");
-        vector shotorg = gettaginfo(veh, gettagindex(veh, tagname));
-        w_shotorg = shotorg;
+        vector vshotorg = gettaginfo(veh, gettagindex(veh, tagname));
+        w_shotorg = vshotorg;
         w_shotdir = v_forward;
         // Fix z-aim (for chase mode)
         crosshair_trace(player);
-        w_shotdir.z = normalize(trace_endpos - shotorg).z * 0.5;
+        w_shotdir.z = normalize(trace_endpos - vshotorg).z * 0.5;
 
         if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0, DEATH_VH_WAKI_GUN.m_id);
         vector org = w_shotorg;
index ea7f0e1fe26f62143774a14a217047780abb9e6c..d89dc2b6457ed51d632307c7d41c550646f61567 100644 (file)
@@ -69,7 +69,7 @@ ERASEABLE
 void db_dump(int db, string filename)
 {
        int fh = fopen(filename, FILE_WRITE);
-       if (fh < 0) LOG_FATALF("Can't dump DB to %s");
+       if (fh < 0) LOG_FATALF("Can't dump DB to %s", filename);
        fputs(fh, "0\n");
        for (int i = 0, n = buf_getsize(db); i < n; ++i)
        {
index 84ae1279d19b288a5b1121d28e7115dac9b531ef..555a73472fb35cff23435bc2c9b7f2cdfbc66525 100644 (file)
@@ -199,9 +199,9 @@ float Obituary_WeaponDeath(
        else
        {
                LOG_TRACEF(
-                       "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
+                       "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %s!\n",
                        deathtype,
-                       death_weapon
+                       death_weapon.netname
                );
        }
 
index fce1f942d5704ab0084d74d45315bd92d894b184..8f131b745c8782c077e84cfef4641e1b4e12f8b1 100644 (file)
@@ -823,7 +823,7 @@ spawnfunc(worldspawn)
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
        if(autocvar_sv_eventlog)
        {
-               string s = sprintf("%d.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
                matchid = strzone(s);
 
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));