summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-11-05 20:10:35 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-11-05 20:10:35 (GMT)
commit150a2e528ee41cb596b59c8a3c9ec62e9bf686fa (patch)
tree4aa02da9f38c5f24acc5ac1176d4010ace8fc8dd /src/simulation/Simulation.cpp
parent8614a2d9638da8ee6982e2a8eadf95eaf5365aa6 (diff)
parent7da144fbae1dac390ddf3bbcc69a990cf91398ac (diff)
downloadpowder-150a2e528ee41cb596b59c8a3c9ec62e9bf686fa.zip
powder-150a2e528ee41cb596b59c8a3c9ec62e9bf686fa.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 5b18118..ee4634c 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -1994,6 +1994,11 @@ void Simulation::init_can_move()
can_move[t][PT_VOID] = 3;
can_move[t][PT_EMBR] = 0;
can_move[PT_EMBR][t] = 0;
+ if (elements[t].Properties&TYPE_ENERGY)
+ {
+ can_move[t][PT_VIBR] = 1;
+ can_move[t][PT_BVBR] = 1;
+ }
}
for (t=0;t<PT_NUM;t++)
{
@@ -2234,6 +2239,12 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
kill_part(i);
return 0;
}
+ if (((r&0xFF)==PT_VIBR || (r&0xFF)==PT_BVBR) && (elements[parts[i].type].Properties & TYPE_ENERGY))
+ {
+ parts[r>>8].tmp += 20;
+ kill_part(i);
+ return 0;
+ }
if (parts[i].type==PT_CNCT && y<ny && (pmap[y+1][x]&0xFF)==PT_CNCT)//check below CNCT for another CNCT
return 0;
@@ -3853,6 +3864,7 @@ void Simulation::update_particles_i(int start, int inc)
else if (t==PT_LAVA) {
if (parts[i].ctype>0 && parts[i].ctype<PT_NUM && parts[i].ctype!=PT_LAVA) {
if (parts[i].ctype==PT_THRM&&pt>=elements[PT_BMTL].HighTemperature) s = 0;
+ else if ((parts[i].ctype==PT_VIBR || parts[i].ctype==PT_BVBR) && pt>=273.15f) s = 0;
else if (elements[parts[i].ctype].HighTemperatureTransition==PT_LAVA) {
if (pt>=elements[parts[i].ctype].HighTemperature) s = 0;
}