From 7a1500c7787419c7bcf74aef2e093b4d47235276 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 9 Feb 2024 17:09:14 +1000 Subject: [PATCH] CLVM: set mapname global correctly (matching SVVM) This is an old bug but the code Nexuiz and Xonotic used to work around it still gives correct results when the prefix and suffix are already stripped. Signed-off-by: bones_was_here --- csprogs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csprogs.c b/csprogs.c index c060ee14..14946c82 100644 --- a/csprogs.c +++ b/csprogs.c @@ -1090,7 +1090,7 @@ void CL_VM_Init (void) PRVM_clientglobalfloat(time) = cl.time; PRVM_clientglobaledict(self) = 0; - PRVM_clientglobalstring(mapname) = PRVM_SetEngineString(prog, cl.worldname); + PRVM_clientglobalstring(mapname) = PRVM_SetEngineString(prog, cl.worldbasename); PRVM_clientglobalfloat(player_localnum) = cl.realplayerentity - 1; PRVM_clientglobalfloat(player_localentnum) = cl.viewentity; -- 2.39.2