From 631e49b8b72d9875e50e3b39caa9612ffddec3a6 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 26 Jan 2013 18:04:24 +0000 Subject: Piston fix: Adjust colour and prevent piston from pushing too far when there's empty space diff --git a/src/simulation/elements/FRME.cpp b/src/simulation/elements/FRME.cpp index 62668ea..352b2a0 100644 --- a/src/simulation/elements/FRME.cpp +++ b/src/simulation/elements/FRME.cpp @@ -4,9 +4,9 @@ Element_FRME::Element_FRME() { Identifier = "DEFAULT_PT_FRME"; Name = "FRME"; - Colour = PIXPACK(0xBBDD50); + Colour = PIXPACK(0x999988); MenuVisible = 1; - MenuSection = SC_ELEC; + MenuSection = SC_SOLIDS; Enabled = 1; Advection = 0.0f; @@ -22,7 +22,7 @@ Element_FRME::Element_FRME() Flammable = 0; Explosive = 0; Meltable = 0; - Hardness = 1; + Hardness = 0; Weight = 100; diff --git a/src/simulation/elements/PSTN.cpp b/src/simulation/elements/PSTN.cpp index 582f070..3714f8e 100644 --- a/src/simulation/elements/PSTN.cpp +++ b/src/simulation/elements/PSTN.cpp @@ -4,9 +4,9 @@ Element_PSTN::Element_PSTN() { Identifier = "DEFAULT_PT_PSTN"; Name = "PSTN"; - Colour = PIXPACK(0xBBFF00); + Colour = PIXPACK(0xAA9999); MenuVisible = 1; - MenuSection = SC_ELEC; + MenuSection = SC_FORCE; Enabled = 1; Advection = 0.0f; @@ -22,7 +22,7 @@ Element_PSTN::Element_PSTN() Flammable = 0; Explosive = 0; Meltable = 0; - Hardness = 1; + Hardness = 0; Weight = 100; @@ -229,6 +229,8 @@ int Element_PSTN::MoveStack(Simulation * sim, int stackX, int stackY, int direct if(!r) { spaces++; tempParts[currentPos++] = 0; + if(spaces >= amount) + break; } else { foundParts = true; if(currentPos < size) -- cgit v0.9.2-21-gd62e