summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/stkm.c5
-rw-r--r--src/elements/stkm2.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/elements/stkm.c b/src/elements/stkm.c
index 55fc225..47e24a2 100644
--- a/src/elements/stkm.c
+++ b/src/elements/stkm.c
@@ -15,6 +15,10 @@ int update_STKM(UPDATE_FUNC_ARGS) {
int r, rx, ry;
float pp, d;
float dt = 0.9;///(FPSB*FPSB); //Delta time in square
+
+ if ((parts[i].ctype>0 && parts[i].ctype<PT_NUM && ptypes[parts[i].ctype].falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT)
+ player[2] = parts[i].ctype;
+
//Tempirature handling
if (parts[i].temp<243)
parts[i].life -= 1;
@@ -420,5 +424,6 @@ int update_STKM(UPDATE_FUNC_ARGS) {
parts[i].life -= 1;
isplayer = 1;
+ parts[i].ctype = player[2];
return 0;
}
diff --git a/src/elements/stkm2.c b/src/elements/stkm2.c
index 02ed09f..14f8c2c 100644
--- a/src/elements/stkm2.c
+++ b/src/elements/stkm2.c
@@ -15,6 +15,10 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
int r, rx, ry;
float pp, d;
float dt = 0.9;///(FPSB*FPSB); //Delta time in square
+
+ if ((parts[i].ctype>0 && parts[i].ctype<PT_NUM && ptypes[parts[i].ctype].falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT)
+ player2[2] = parts[i].ctype;
+
//Tempirature handling
if (parts[i].temp<243)
parts[i].life -= 1;
@@ -420,6 +424,7 @@ int update_STKM2(UPDATE_FUNC_ARGS) {
parts[i].life -= 1;
isplayer2 = 1;
+ parts[i].ctype = player2[2];
return 0;
}