From: terencehill Date: Sun, 22 Jul 2018 13:05:34 +0000 (+0200) Subject: Fix %x not being replaced in chat messages by the name of the item you are looking at X-Git-Tag: xonotic-v0.8.5~1930^2~4 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=31f3d6ab253693e9b44e107d073145d579569d20 Fix %x not being replaced in chat messages by the name of the item you are looking at --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 319b6f16f..e4e3abace 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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;