summaryrefslogtreecommitdiff
path: root/src/simulation/elements/STKM.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-16 01:30:47 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:13:27 (GMT)
commit6d1c7be74068a06ba8a64dbe3d94a8a25fa7b09e (patch)
treebbba7b35ed29785d3cb1c4f91ac4b3cf343d74a7 /src/simulation/elements/STKM.cpp
parentfd07d35e348e1c904a3da6fd67237fde4e88182d (diff)
downloadpowder-6d1c7be74068a06ba8a64dbe3d94a8a25fa7b09e.zip
powder-6d1c7be74068a06ba8a64dbe3d94a8a25fa7b09e.tar.gz
initialize all stickmen variables, not just legs
Diffstat (limited to 'src/simulation/elements/STKM.cpp')
-rw-r--r--src/simulation/elements/STKM.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp
index 9024e08..081720e 100644
--- a/src/simulation/elements/STKM.cpp
+++ b/src/simulation/elements/STKM.cpp
@@ -79,7 +79,7 @@ int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) {
playerp->elem = parts[i].ctype;
playerp->frames++;
- //Tempirature handling
+ //Temperature handling
if (parts[i].temp<243)
parts[i].life -= 1;
if ((parts[i].temp<309.6f) && (parts[i].temp>=243))
@@ -545,6 +545,12 @@ void Element_STKM::STKM_init_legs(Simulation * sim, playerst* playerp, int i)
playerp->legs[13] = y+12;
playerp->legs[14] = x+3;
playerp->legs[15] = y+12;
+
+ for (int i = 0; i < 8; i++)
+ playerp->accs[i] = 0;
+ playerp->comm = 0;
+ playerp->pcomm = 0;
+ playerp->frames = 0;
}