mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-27 09:54:36 +02:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user