mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- checkhitswitch_r part 2
This commit is contained in:
parent
2a23dfa0a8
commit
e81b37b31a
1 changed files with 7 additions and 6 deletions
|
@ -611,14 +611,14 @@ bool checkhitswitch_r(int snum, int w, int switchtype)
|
||||||
case DIPSWITCH:
|
case DIPSWITCH:
|
||||||
case TECHSWITCH:
|
case TECHSWITCH:
|
||||||
case ALIENSWITCH:
|
case ALIENSWITCH:
|
||||||
if (switchtype == 0 && i == w) wall[x].picnum++;
|
if (switchtype == SWITCH_WALL && i == w) wall[x].picnum++;
|
||||||
else if (wall[x].hitag == 0) correctdips++;
|
else if (wall[x].hitag == 0) correctdips++;
|
||||||
numdips++;
|
numdips++;
|
||||||
break;
|
break;
|
||||||
case DIPSWITCH + 1:
|
case DIPSWITCH + 1:
|
||||||
case TECHSWITCH + 1:
|
case TECHSWITCH + 1:
|
||||||
case ALIENSWITCH + 1:
|
case ALIENSWITCH + 1:
|
||||||
if (switchtype == 0 && i == w) wall[x].picnum--;
|
if (switchtype == SWITCH_WALL && i == w) wall[x].picnum--;
|
||||||
else if (wall[x].hitag == 1) correctdips++;
|
else if (wall[x].hitag == 1) correctdips++;
|
||||||
numdips++;
|
numdips++;
|
||||||
break;
|
break;
|
||||||
|
@ -788,15 +788,16 @@ bool checkhitswitch_r(int snum, int w, int switchtype)
|
||||||
{
|
{
|
||||||
int switches[3], switchcount = 0, j;
|
int switches[3], switchcount = 0, j;
|
||||||
S_PlaySound3D(SWITCH_ON, act, &v);
|
S_PlaySound3D(SWITCH_ON, act, &v);
|
||||||
for (j = 0; j < MAXSPRITES; j++)
|
DukeSpriteIterator it;
|
||||||
|
while (auto actt = it.Next())
|
||||||
{
|
{
|
||||||
int jpn = sprite[j].picnum;
|
int jpn = actt->s.picnum;
|
||||||
int jht = sprite[j].hitag;
|
int jht = actt->s.hitag;
|
||||||
if ((jpn == MULTISWITCH || jpn == MULTISWITCH2) && jht == 10000)
|
if ((jpn == MULTISWITCH || jpn == MULTISWITCH2) && jht == 10000)
|
||||||
{
|
{
|
||||||
if (switchcount < 3)
|
if (switchcount < 3)
|
||||||
{
|
{
|
||||||
switches[switchcount] = j;
|
switches[switchcount] = actt->GetIndex();
|
||||||
switchcount++;
|
switchcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue