summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Simulation.cpp9
-rw-r--r--src/simulation/elements/SPAWN.cpp15
-rw-r--r--src/simulation/elements/SPAWN2.cpp15
3 files changed, 10 insertions, 29 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index de92fff..f7d90ed 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2915,7 +2915,6 @@ int Simulation::create_part(int p, int x, int y, int tv)
parts[i].life = 100;
Element_STKM::STKM_init_legs(this, &player, i);
player.spwn = 1;
- player.elem = PT_DUST;
player.rocketBoots = false;
}
else
@@ -2931,7 +2930,6 @@ int Simulation::create_part(int p, int x, int y, int tv)
parts[i].life = 100;
Element_STKM::STKM_init_legs(this, &player2, i);
player2.spwn = 1;
- player2.elem = PT_DUST;
player2.rocketBoots = false;
}
else
@@ -3521,9 +3519,14 @@ void Simulation::update_particles_i(int start, int inc)
kill_part(i);
continue;
}
+
+ if (parts[i].type == PT_SPAWN && !player.spwn)
+ create_part(-1, parts[i].x, parts[i].y, PT_STKM);
+ else if (parts[i].type == PT_SPAWN2 && !player2.spwn)
+ create_part(-1, parts[i].x, parts[i].y, PT_STKM2);
}
- //the main particle loop function, goes over all particles.
+ //the main particle loop function, goes over all particles.
for (i=0; i<=parts_lastActiveIndex; i++)
if (parts[i].type)
{
diff --git a/src/simulation/elements/SPAWN.cpp b/src/simulation/elements/SPAWN.cpp
index db12b2f..9598b4d 100644
--- a/src/simulation/elements/SPAWN.cpp
+++ b/src/simulation/elements/SPAWN.cpp
@@ -26,7 +26,7 @@ Element_SPAWN::Element_SPAWN()
Weight = 100;
- Temperature = R_TEMP+0.0f +273.15f;
+ Temperature = R_TEMP+273.15f;
HeatConduct = 0;
Description = "STKM spawn point.";
@@ -42,19 +42,8 @@ Element_SPAWN::Element_SPAWN()
HighTemperature = ITH;
HighTemperatureTransition = NT;
- Update = &Element_SPAWN::update;
+ Update = NULL;
}
-//#TPT-Directive ElementHeader Element_SPAWN static int update(UPDATE_FUNC_ARGS)
-int Element_SPAWN::update(UPDATE_FUNC_ARGS)
- {
- if (!sim->player.spwn)
- sim->create_part(-1, x, y, PT_STKM);
-
- return 0;
-}
-
-
-
Element_SPAWN::~Element_SPAWN() {}
diff --git a/src/simulation/elements/SPAWN2.cpp b/src/simulation/elements/SPAWN2.cpp
index 96a50da..eece19f 100644
--- a/src/simulation/elements/SPAWN2.cpp
+++ b/src/simulation/elements/SPAWN2.cpp
@@ -26,7 +26,7 @@ Element_SPAWN2::Element_SPAWN2()
Weight = 100;
- Temperature = R_TEMP+0.0f +273.15f;
+ Temperature = R_TEMP+273.15f;
HeatConduct = 0;
Description = "STK2 spawn point.";
@@ -42,19 +42,8 @@ Element_SPAWN2::Element_SPAWN2()
HighTemperature = ITH;
HighTemperatureTransition = NT;
- Update = &Element_SPAWN2::update;
+ Update = NULL;
}
-//#TPT-Directive ElementHeader Element_SPAWN2 static int update(UPDATE_FUNC_ARGS)
-int Element_SPAWN2::update(UPDATE_FUNC_ARGS)
- {
- if (!sim->player2.spwn)
- sim->create_part(-1, x, y, PT_STKM2);
-
- return 0;
-}
-
-
-
Element_SPAWN2::~Element_SPAWN2() {}