Fix lua reset_level

The lua des.reset_level() call did not reset the special level
coder, so some values were kept and couldn't be changed.
Adjust the movement tests for this change.
This commit is contained in:
Pasi Kallinen
2026-01-28 10:06:55 +02:00
parent 060c3de8eb
commit b34b7e08a4
2 changed files with 10 additions and 3 deletions

View File

@@ -5985,8 +5985,13 @@ lspo_reset_level(lua_State *L)
boolean wtower = In_W_tower(u.ux, u.uy, &u.uz);
iflags.lua_testing = TRUE;
if (L)
if (L) {
if (gc.coder) {
Free(gc.coder);
gc.coder = NULL;
}
create_des_coder();
}
makemap_prepost(TRUE, wtower);
gi.in_mklev = TRUE;
oinit(); /* assign level dependent obj probabilities */