summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-11-04 21:10:27 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-11-04 21:10:27 (GMT)
commit828623f9ec4c704fd0507f96fec1638f72ca90c5 (patch)
tree320222553e1346cf9d2a7a67f5dfbf085c14fd63 /src/simulation/Simulation.cpp
parent12eb085d20dbb57cbbe79d92c9077dcc9de60330 (diff)
downloadpowder-828623f9ec4c704fd0507f96fec1638f72ca90c5.zip
powder-828623f9ec4c704fd0507f96fec1638f72ca90c5.tar.gz
Change freezing point of VIBR lava, and make sure VIBR always absorbs energy particles
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;
}