]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix %x not being replaced in chat messages by the name of the item you are looking at
authorterencehill <piuntn@gmail.com>
Sun, 22 Jul 2018 13:05:34 +0000 (15:05 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 22 Jul 2018 13:05:34 +0000 (15:05 +0200)
qcsrc/server/miscfunctions.qc

index 319b6f16ff7e3c7c333d8fb3a67e2b360eefbde8..e4e3abace5d370008b45e64b7b1256bc5287170f 100644 (file)
@@ -219,6 +219,7 @@ string AmmoNameFromWeaponentity(Weapon wep)
        return ammoitems;
 }
 
+.float old_solid;
 string formatmessage(entity this, string msg)
 {
        float p, p1, p2;
@@ -230,7 +231,16 @@ string formatmessage(entity this, string msg)
        p = 0;
        n = 7;
 
+       IL_EACH(g_items, true,
+       {
+               it.old_solid = it.solid;
+               it.solid = SOLID_BSP;
+       });
        WarpZone_crosshair_trace(this);
+       IL_EACH(g_items, true,
+       {
+               it.solid = it.old_solid;
+       });
        cursor = trace_endpos;
        cursor_ent = trace_ent;