From a16534e78247a4a2625a95adffddb1ef38ee6b02 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 4 Oct 2012 17:32:13 -0400 Subject: don't let TNT flood fill explode when under other particles (prevents lag) diff --git a/src/simulation/elements/BANG.cpp b/src/simulation/elements/BANG.cpp index 2dc660a..b0ff983 100644 --- a/src/simulation/elements/BANG.cpp +++ b/src/simulation/elements/BANG.cpp @@ -75,8 +75,11 @@ int Element_BANG::update(UPDATE_FUNC_ARGS) } else if(parts[i].tmp==1) { - int tempvalue = 2; - sim->flood_prop(x, y, offsetof(Particle, tmp), &tempvalue, StructProperty::Integer); + if ((pmap[y][x]>>8 == i)) + { + int tempvalue = 2; + sim->flood_prop(x, y, offsetof(Particle, tmp), &tempvalue, StructProperty::Integer); + } parts[i].tmp = 2; } else if(parts[i].tmp==2) -- cgit v0.9.2-21-gd62e