diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-08-20 17:42:41 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-20 18:37:26 (GMT) |
| commit | d32ae818dc3533ef183e5448744e121ea11a857d (patch) | |
| tree | cae59ea955381a0c47aca774a8dabab1d493e397 /src/elements | |
| parent | 5f8fba12c8ce6740a0dfabc3b04a80893e7a041d (diff) | |
| download | powder-d32ae818dc3533ef183e5448744e121ea11a857d.zip powder-d32ae818dc3533ef183e5448744e121ea11a857d.tar.gz | |
Make STKM spawn below PRTO (less likely to get stuck), and implement PROP_DEADLY
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/stkm.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/elements/stkm.c b/src/elements/stkm.c index b45e137..b27d945 100644 --- a/src/elements/stkm.c +++ b/src/elements/stkm.c @@ -389,21 +389,23 @@ void STKM_interact(float* playerp, int i, int x, int y) if ((r&0xFF)==PT_PLUT) //If on plut parts[i].life -= 1; + + if (ptypes[r&0xFF].properties&PROP_DEADLY) + parts[i].life -= 1; if ((r&0xFF)==PT_PRTI && parts[i].type) { - int nnx, count; + int nnx, count=1;//gives rx=0, ry=1 in update_PRTO parts[r>>8].tmp = (int)((parts[r>>8].temp-73.15f)/100+1); if (parts[r>>8].tmp>=CHANNELS) parts[r>>8].tmp = CHANNELS-1; else if (parts[r>>8].tmp<0) parts[r>>8].tmp = 0; - for (count=1; count<=8; count++) - for (nnx=0; nnx<80; nnx++) - if (!portalp[parts[r>>8].tmp][count-1][nnx].type) - { - portalp[parts[r>>8].tmp][count-1][nnx] = parts[i]; - kill_part(i); - playerp[27] = 1;//stop SPWN creating a new STKM while he is in portal - } + for (nnx=0; nnx<80; nnx++) + if (!portalp[parts[r>>8].tmp][count][nnx].type) + { + portalp[parts[r>>8].tmp][count][nnx] = parts[i]; + kill_part(i); + playerp[27] = 1;//stop SPWN creating a new STKM while he is in portal + } } } } |
