summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/prti.c4
-rw-r--r--src/elements/soap.c17
2 files changed, 4 insertions, 17 deletions
diff --git a/src/elements/prti.c b/src/elements/prti.c
index 7205844..f7599bf 100644
--- a/src/elements/prti.c
+++ b/src/elements/prti.c
@@ -33,6 +33,10 @@ int update_PRTI(UPDATE_FUNC_ARGS) {
if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (ptypes[r&0xFF].falldown== 0 && ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK))
continue;
}
+
+ if ((r&0xFF) == PT_SOAP)
+ detach(r>>8);
+
for ( nnx=0; nnx<80; nnx++)
if (!portalp[parts[i].tmp][count-1][nnx].type)
{
diff --git a/src/elements/soap.c b/src/elements/soap.c
index 0496bd2..ce8ff3d 100644
--- a/src/elements/soap.c
+++ b/src/elements/soap.c
@@ -1,22 +1,5 @@
#include <element.h>
-void detach(int i)
-{
- if ((parts[i].ctype&2) == 2)
- {
- if ((parts[parts[i].tmp].ctype&4) == 4)
- parts[parts[i].tmp].ctype ^= 4;
- }
-
- if ((parts[i].ctype&4) == 4)
- {
- if ((parts[parts[i].tmp2].ctype&2) == 2)
- parts[parts[i].tmp2].ctype ^= 2;
- }
-
- parts[i].ctype = 0;
-}
-
int update_SOAP(UPDATE_FUNC_ARGS)
{
int r, rx, ry;