The-Powder-Toy/src
Tamás Bálint Misius 2eee738a9f
Fix another extremely rare pmap corruption
The real fix was made in Simulation::kill_part, where photons[y][x] wasn't cleared when i = 0 because the pmap branch triggered instead. Broken since ff7428fc70, which only partially fixed some related bug. I decided to also fix every other case, even if they are not strictly necessary because they write 0 to pmap/photons anyway.

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 = 3498763327
			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)
2023-12-12 22:19:13 +01:00
..
bson Remove a few outdated windows-only preprocessor hacks 2023-10-15 12:04:22 +02:00
bzip2 Preprocessor purge round 19: Split and minimize usage of Config.h 2023-01-27 09:27:32 +01:00
client Default to identity mapping elements not in the palette for pre-98.0 saves 2023-12-10 13:38:33 +01:00
common Default to identity mapping elements not in the palette for pre-98.0 saves 2023-12-10 13:38:33 +01:00
debug Sort out constness of Simulation::PlanMove 2023-12-08 22:40:46 +01:00
graphics Sort out constness of Simulation and Renderer in graphics functions 2023-12-09 16:37:45 +01:00
gui Fix uninitialized read of Engine::dt early after startup again 2023-12-12 15:28:15 +01:00
lua Prevent Lua callbacks from being called from secondary SaveRenderers 2023-12-09 16:37:50 +01:00
prefs Prevent almost all HTTP requests from blocking 2023-06-10 19:19:53 +02:00
resampler Remove a few outdated windows-only preprocessor hacks 2023-10-15 12:04:22 +02:00
simulation Fix another extremely rare pmap corruption 2023-12-12 22:19:13 +01:00
tasks Use a proper ProgressBar in UpdateActivity 2023-10-25 22:20:13 +02:00
Activity.h Preprocessor purge round 19: Split and minimize usage of Config.h 2023-01-27 09:27:32 +01:00
Config.template.h Remove snapshot_id 2023-10-19 12:51:11 +02:00
Controller.h Preprocessor purge round 2: #pragma once 2023-01-27 09:26:38 +01:00
Format.cpp Refactor PNG and working with alpha 2023-04-05 21:30:24 +02:00
Format.h Refactor PNG and working with alpha 2023-04-05 21:30:24 +02:00
FpsLimit.h Emscripten: Add "vsync" FPS limit mode 2023-08-22 00:26:32 +02:00
meson.build Remove snapshot_id 2023-10-19 12:51:11 +02:00
Misc.cpp Remove a few outdated windows-only preprocessor hacks 2023-10-15 12:04:22 +02:00
Misc.h Prevent almost all HTTP requests from blocking 2023-06-10 19:19:53 +02:00
PowderToy.cpp Enable basic rendering of custom elements in secondary Renderers 2023-12-08 22:40:44 +01:00
PowderToyFontEditor.cpp Clean up window creation somewhat 2023-10-05 19:47:29 +02:00
PowderToyRenderer.cpp Enable basic rendering of custom elements in secondary Renderers 2023-12-08 22:40:44 +01:00
PowderToySDL.cpp Fix guess best scale prompt showing up even when it guesses the default 2023-10-14 15:38:37 +02:00
PowderToySDL.h Clean up window creation somewhat 2023-10-05 19:47:29 +02:00
PowderToySDLCommon.cpp Emscripten: Disable hopefully all ways to quit 2023-08-22 00:26:33 +02:00
PowderToySDLEmscripten.cpp Emscripten: Add Platform::MarkPresentable 2023-08-23 00:42:34 +02:00
Probability.cpp Preprocessor purge round 19: Split and minimize usage of Config.h 2023-01-27 09:27:32 +01:00
Probability.h Preprocessor purge round 19: Split and minimize usage of Config.h 2023-01-27 09:27:32 +01:00
SDLCompat.cpp fix windows / renderer compile (renderer requires sdl for now) 2018-05-25 21:19:44 -04:00
SimulationConfig.h Move Simulation::platent to Element::LatentHeat 2023-12-08 23:36:34 +01:00
VcsTag.template.h Add tpt.version.vcstag 2023-09-05 20:20:00 +02:00
WindowIcon.cpp Refactor PNG and working with alpha 2023-04-05 21:30:24 +02:00
WindowIcon.h Move platform-specific code out of entrypoint TUs 2023-01-27 09:26:41 +01:00
X86KillDenormals.cpp Preprocessor purge round 13: X86 2023-01-27 09:26:40 +01:00
X86KillDenormals.h Preprocessor purge round 13: X86 2023-01-27 09:26:40 +01:00