Open dragokas opened 4 years ago
Even, "sm_map" lies. She is reporting about success, but ForceChangeLevel() is failed.
sm_map 1
[SM] Changing map to c14m1_junkyard...
L 11/28/2020 - 18:15:47: [basecommands.smx] "Console<0><Console><Console>" changed map to "1"
L 11/28/2020 - 18:15:50: [SM] Changed map to "1"
CModelLoader::Map_IsValid: No such map 'maps/1.bsp'
changelevel failed: 1 not found
This is intentional, and was done to match the behaviour of changelevel
- but from your test there it looks like L4D2 might not actually be a version with that behaviour (or there are other restrictions in play).
CHalfLife2::IsMapValid
needs changing to check == Found
rather than != NotFound
, but it'll need testing across at least L4D2, TF2, CS:GO, and SDK2013 by the sound of it.In L4D2 the !map command fails also when the fullname of the map is not specified.
Example: c1m1_hotel
If I type !map c1m1 in the chat, it says "changing to c1m1_hotel" but doesn't changes, and if I try to use the command again, it stops working (even with the full name).
To make it work again, I always have to restart the server. (changing the map doesn't fix)
For me, even more strange things are happening. When I enter something like "sm_map 1" and passed to the final safe room, the round looks like ends (i see the statistics), but after 5 sec, map still doesn't end, statistics is disappeared and I got frozen player on the old map.
Help us help you
Environment
Description
When you check is map valid with IsMapValid() function, it also returns true when partial-string matched. Is it by intention?
Problematic Code (or Steps to Reproduce)
Logs
Actually, there is no de_swamp.bsp in Left 4 Dead 2. Instead, there is maps/styleguide_swamp01.bsp