diff --git a/Changelog.txt b/Changelog.txt index 0c0c6b394..47624eccd 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -4154,3 +4154,5 @@ When setting a property like MORE to the a spell or skill defname, trying to rea 08-10-2026, Mulambo - Changed: Equipped armor / weapon will also drop on ground when moving it while overweight, like other items (unless OF_OWNoDropCarriedItem is enabled). + WARNING! POTENTIALLY BREAKING CHANGE! +- Changed: `serv.map(location)` 3rd parameter is now always `z` position (was `map` when received 3 arguments or `z` when received 4 arguments). diff --git a/src/game/CServerConfig.cpp b/src/game/CServerConfig.cpp index 170b45597..b4ef6fc75 100644 --- a/src/game/CServerConfig.cpp +++ b/src/game/CServerConfig.cpp @@ -1677,15 +1677,18 @@ bool CServerConfig::r_WriteVal( lpctstr ptcKey, CSString & sVal, CTextConsole * if (IsDigit(ppVal[3][0])) { pt.m_map = (byte)(atoi(ppVal[3])); + + if (!g_MapList.IsMapSupported(pt.m_map)) { + g_Log.EventError("Unsupported Map %d\n", pt.m_map); + return false; + } } FALLTHROUGH; case 3: - if ( IsDigit(ppVal[2][0]) || (( iArgs == 4 ) && ( ppVal[2][0] == '-' )) ) + if (IsDigit(ppVal[2][0]) || ppVal[2][0] == '-') { - pt.m_z = (char)(( iArgs == 4 ) ? atoi(ppVal[2]) : 0); - if ( iArgs == 3 ) - pt.m_map = (byte)(atoi(ppVal[2])); + pt.m_z = static_cast(atoi(ppVal[2])); } FALLTHROUGH;