mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Make mapmusflags
and mapmusname
writable.
This commit is contained in:
parent
365e02bb32
commit
c70d5a9773
1 changed files with 15 additions and 0 deletions
|
@ -399,6 +399,21 @@ int LUA_CheckGlobals(lua_State *L, const char *word)
|
|||
if (player)
|
||||
displayplayer = player - players;
|
||||
}
|
||||
else if (fastcmp(word, "mapmusname"))
|
||||
{
|
||||
size_t strlength;
|
||||
const char *str = luaL_checkstring(L, 2, &strlength);
|
||||
|
||||
if (strlength > 6)
|
||||
return luaL_error(L, "string length out of range (maximum 6 characters)");
|
||||
|
||||
if (strlen(str) < strlength)
|
||||
return luaL_error(L, "string must not contain embedded zeros!");
|
||||
|
||||
strncpy(mapmusname, str, strlength);
|
||||
}
|
||||
else if (fastcmp(word, "mapmusflags"))
|
||||
mapmusflags = (UINT16)luaL_checkinteger(L, 2);
|
||||
else
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue