From 42049bc116f9e478d57d934679f732ec8e299c57 Mon Sep 17 00:00:00 2001 From: drjaska Date: Wed, 10 May 2023 06:06:23 +0300 Subject: [PATCH] add %o and %O to chat formatting for origin %O is just for more decimals as an opt-in if %o isn't accurate enough. --- qcsrc/server/chat.qc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qcsrc/server/chat.qc b/qcsrc/server/chat.qc index 41af1de57..79d866523 100644 --- a/qcsrc/server/chat.qc +++ b/qcsrc/server/chat.qc @@ -505,6 +505,8 @@ string formatmessage(entity this, string msg) case "l": replacement = NearestLocation(this.origin); break; case "y": replacement = NearestLocation(cursor); break; case "d": replacement = NearestLocation(this.death_origin); break; + case "o": replacement = vtos(this.origin); break; + case "O": replacement = sprintf("'%f %f %f'", this.origin.x, this.origin.y, this.origin.z); break; case "w": replacement = WeaponNameFromWeaponentity(this, weaponentity); break; case "W": replacement = GetAmmoName(this.(weaponentity).m_weapon.ammo_type); break; case "x": replacement = ((cursor_ent.netname == "" || !cursor_ent) ? "nothing" : cursor_ent.netname); break; -- 2.39.2