Fix extremely rare pmap corruption

c4dcb37de4 added a kill_part without a return 1.

Reproduce with

	sim.loadSave(3062273, 1)
	sim.ensureDeterminism(true)
	tpt.setfpscap(2)
	local function F()
		print(sim.framerender(), sim.randomseed())
		if sim.framerender() == 0 then
			local a = 2247503365
			print(sim.hash(), a)
			sim.framerender(1200)
			sim.reloadSave()
			sim.randomseed(a, a + 1, a + 2, a + 3)
			tpt.set_pause(0)
		end
	end
	event.register(event.tick, F)
This commit is contained in:
Tamás Bálint Misius
2023-12-12 19:47:14 +01:00
parent 986de1066d
commit 6433eb04f2

View File

@@ -108,7 +108,10 @@ static int update(UPDATE_FUNC_ARGS)
if (parts[i].life)
{
if (!--parts[i].life)
{
sim->kill_part(i);
return 1;
}
}
break;
default: