mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make mapmusflags and mapmusname writable.
This commit is contained in:
parent
fbd20c9591
commit
6126e8badf
1 changed files with 15 additions and 0 deletions
|
|
@ -399,6 +399,21 @@ int LUA_CheckGlobals(lua_State *L, const char *word)
|
||||||
if (player)
|
if (player)
|
||||||
displayplayer = player - players;
|
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
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue