]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
CLVM: set mapname global correctly (matching SVVM)
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 9 Feb 2024 07:09:14 +0000 (17:09 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 9 Feb 2024 07:19:48 +0000 (17:19 +1000)
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 <bones_was_here@xonotic.au>
csprogs.c

index c060ee14f4544729ea7434db7141acba4cbde7e3..14946c82a3540233050f249e12a8106d3de6bf28 100644 (file)
--- 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;