]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Fix %x not being replaced in chat messages by the name of the item you are looking at
[xonotic/xonotic-data.pk3dir.git] / 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;