mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Merge branch 'patch-valid' into 'next'
Don't error when checking patch.valid on invalid patches See merge request STJr/SRB2!780
This commit is contained in:
commit
0ca3a4eca3
1 changed files with 7 additions and 3 deletions
|
|
@ -268,10 +268,14 @@ static int patch_get(lua_State *L)
|
||||||
#endif
|
#endif
|
||||||
enum patch field = luaL_checkoption(L, 2, NULL, patch_opt);
|
enum patch field = luaL_checkoption(L, 2, NULL, patch_opt);
|
||||||
|
|
||||||
// patches are CURRENTLY always valid, expected to be cached with PU_STATIC
|
// patches are invalidated when switching renderers
|
||||||
// this may change in the future, so patch.valid still exists
|
if (!patch) {
|
||||||
if (!patch)
|
if (field == patch_valid) {
|
||||||
|
lua_pushboolean(L, 0);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return LUA_ErrInvalid(L, "patch_t");
|
return LUA_ErrInvalid(L, "patch_t");
|
||||||
|
}
|
||||||
|
|
||||||
switch (field)
|
switch (field)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue