mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-04 07:20:39 +00:00
- a few quick ones, mostly simple search & replace.
This commit is contained in:
parent
a3601e59ef
commit
13093aef56
3 changed files with 55 additions and 50 deletions
|
@ -1837,8 +1837,9 @@ void reactor(int i, int REACTOR, int REACTOR2, int REACTORBURNT, int REACTOR2BUR
|
||||||
|
|
||||||
if (t[4] == 1)
|
if (t[4] == 1)
|
||||||
{
|
{
|
||||||
int j = headspritesect[sect];
|
SectIterator it(sect);
|
||||||
while (j >= 0)
|
int j;
|
||||||
|
while ((j = it.NextIndex()) >= 0)
|
||||||
{
|
{
|
||||||
auto sprj = &sprite[j];
|
auto sprj = &sprite[j];
|
||||||
if (sprj->picnum == SECTOREFFECTOR)
|
if (sprj->picnum == SECTOREFFECTOR)
|
||||||
|
@ -1861,9 +1862,7 @@ void reactor(int i, int REACTOR, int REACTOR2, int REACTORBURNT, int REACTOR2BUR
|
||||||
{
|
{
|
||||||
sprj->cstat = (short)32768;
|
sprj->cstat = (short)32768;
|
||||||
}
|
}
|
||||||
j = nextspritesect[j];
|
} return;
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t[1] >= 20)
|
if (t[1] >= 20)
|
||||||
|
|
|
@ -3699,11 +3699,12 @@ void moveeffectors_d(void) //STATNUM 3
|
||||||
while (j >= 0)
|
while (j >= 0)
|
||||||
{
|
{
|
||||||
nextj = nextspritesect[j];
|
nextj = nextspritesect[j];
|
||||||
if (sprite[j].zvel >= 0)
|
auto sprj = &sprite[j];
|
||||||
switch (sprite[j].statnum)
|
if (sprj->zvel >= 0)
|
||||||
|
switch (sprj->statnum)
|
||||||
{
|
{
|
||||||
case 5:
|
case 5:
|
||||||
switch (sprite[j].picnum)
|
switch (sprj->picnum)
|
||||||
{
|
{
|
||||||
case BLOODPOOL:
|
case BLOODPOOL:
|
||||||
case PUKE:
|
case PUKE:
|
||||||
|
@ -3716,7 +3717,7 @@ void moveeffectors_d(void) //STATNUM 3
|
||||||
case BLOODSPLAT2:
|
case BLOODSPLAT2:
|
||||||
case BLOODSPLAT3:
|
case BLOODSPLAT3:
|
||||||
case BLOODSPLAT4:
|
case BLOODSPLAT4:
|
||||||
sprite[j].xrepeat = sprite[j].yrepeat = 0;
|
sprj->xrepeat = sprj->yrepeat = 0;
|
||||||
j = nextj;
|
j = nextj;
|
||||||
continue;
|
continue;
|
||||||
case LASERLINE:
|
case LASERLINE:
|
||||||
|
@ -3724,36 +3725,36 @@ void moveeffectors_d(void) //STATNUM 3
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
if (sprite[j].picnum == TRIPBOMB) break;
|
if (sprj->picnum == TRIPBOMB) break;
|
||||||
case 1:
|
case 1:
|
||||||
case 0:
|
case 0:
|
||||||
if (
|
if (
|
||||||
sprite[j].picnum == BOLT1 ||
|
sprj->picnum == BOLT1 ||
|
||||||
sprite[j].picnum == BOLT1 + 1 ||
|
sprj->picnum == BOLT1 + 1 ||
|
||||||
sprite[j].picnum == BOLT1 + 2 ||
|
sprj->picnum == BOLT1 + 2 ||
|
||||||
sprite[j].picnum == BOLT1 + 3 ||
|
sprj->picnum == BOLT1 + 3 ||
|
||||||
sprite[j].picnum == SIDEBOLT1 ||
|
sprj->picnum == SIDEBOLT1 ||
|
||||||
sprite[j].picnum == SIDEBOLT1 + 1 ||
|
sprj->picnum == SIDEBOLT1 + 1 ||
|
||||||
sprite[j].picnum == SIDEBOLT1 + 2 ||
|
sprj->picnum == SIDEBOLT1 + 2 ||
|
||||||
sprite[j].picnum == SIDEBOLT1 + 3 ||
|
sprj->picnum == SIDEBOLT1 + 3 ||
|
||||||
wallswitchcheck(j)
|
wallswitchcheck(j)
|
||||||
)
|
)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!(sprite[j].picnum >= CRANE && sprite[j].picnum <= (CRANE + 3)))
|
if (!(sprj->picnum >= CRANE && sprj->picnum <= (CRANE + 3)))
|
||||||
{
|
{
|
||||||
if (sprite[j].z > (hittype[j].floorz - (16 << 8)))
|
if (sprj->z > (hittype[j].floorz - (16 << 8)))
|
||||||
{
|
{
|
||||||
hittype[j].bposx = sprite[j].x;
|
hittype[j].bposx = sprj->x;
|
||||||
hittype[j].bposy = sprite[j].y;
|
hittype[j].bposy = sprj->y;
|
||||||
|
|
||||||
sprite[j].x += x >> 2;
|
sprj->x += x >> 2;
|
||||||
sprite[j].y += l >> 2;
|
sprj->y += l >> 2;
|
||||||
|
|
||||||
setsprite(j, sprite[j].x, sprite[j].y, sprite[j].z);
|
setsprite(j, sprj->x, sprj->y, sprj->z);
|
||||||
|
|
||||||
if (sector[sprite[j].sectnum].floorstat & 2)
|
if (sector[sprj->sectnum].floorstat & 2)
|
||||||
if (sprite[j].statnum == 2)
|
if (sprj->statnum == 2)
|
||||||
makeitfall(j);
|
makeitfall(j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2573,40 +2573,42 @@ void onBoatMove(int snum, int psect, int j)
|
||||||
void onMotorcycleHit(int snum, int var60)
|
void onMotorcycleHit(int snum, int var60)
|
||||||
{
|
{
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
|
auto s = &sprite[var60];
|
||||||
if (badguy(&sprite[var60]) || sprite[var60].picnum == APLAYER)
|
auto ht = &hittype[var60];
|
||||||
|
if (badguy(s) || s->picnum == APLAYER)
|
||||||
{
|
{
|
||||||
if (sprite[var60].picnum != APLAYER)
|
if (s->picnum != APLAYER)
|
||||||
{
|
{
|
||||||
if (numplayers == 1)
|
if (numplayers == 1)
|
||||||
{
|
{
|
||||||
fi.movesprite(var60, sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild() + 512) & 2047] >> 8,
|
fi.movesprite(var60, sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild() + 512) & 2047] >> 8,
|
||||||
sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild()) & 2047] >> 8, sprite[var60].zvel, CLIPMASK0);
|
sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild()) & 2047] >> 8, s->zvel, CLIPMASK0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hittype[var60].owner = p->i;
|
ht->owner = p->i;
|
||||||
hittype[var60].picnum = MOTOHIT;
|
ht->picnum = MOTOHIT;
|
||||||
hittype[var60].extra = p->MotoSpeed >> 1;
|
ht->extra = p->MotoSpeed >> 1;
|
||||||
p->MotoSpeed -= p->MotoSpeed >> 2;
|
p->MotoSpeed -= p->MotoSpeed >> 2;
|
||||||
p->TurbCount = 6;
|
p->TurbCount = 6;
|
||||||
}
|
}
|
||||||
else if ((sprite[var60].picnum == RRTILE2431 || sprite[var60].picnum == RRTILE2443 || sprite[var60].picnum == RRTILE2451 || sprite[var60].picnum == RRTILE2455)
|
else if ((s->picnum == RRTILE2431 || s->picnum == RRTILE2443 || s->picnum == RRTILE2451 || s->picnum == RRTILE2455)
|
||||||
&& sprite[var60].picnum != ACTIVATORLOCKED && p->MotoSpeed > 45)
|
&& s->picnum != ACTIVATORLOCKED && p->MotoSpeed > 45)
|
||||||
{
|
{
|
||||||
S_PlayActorSound(SQUISHED, var60);
|
S_PlayActorSound(SQUISHED, var60);
|
||||||
if (sprite[var60].picnum == RRTILE2431 || sprite[var60].picnum == RRTILE2451)
|
if (s->picnum == RRTILE2431 || s->picnum == RRTILE2451)
|
||||||
{
|
{
|
||||||
if (sprite[var60].lotag != 0)
|
if (s->lotag != 0)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < MAXSPRITES; j++)
|
for (int j = 0; j < MAXSPRITES; j++)
|
||||||
{
|
{
|
||||||
if ((sprite[j].picnum == RRTILE2431 || sprite[j].picnum == RRTILE2451) && sprite[j].pal == 4)
|
auto sprj = &sprite[j];
|
||||||
|
if ((sprj->picnum == RRTILE2431 || sprj->picnum == RRTILE2451) && sprj->pal == 4)
|
||||||
{
|
{
|
||||||
if (sprite[var60].lotag == sprite[j].lotag)
|
if (s->lotag == sprj->lotag)
|
||||||
{
|
{
|
||||||
sprite[j].xrepeat = 0;
|
sprj->xrepeat = 0;
|
||||||
sprite[j].yrepeat = 0;
|
sprj->yrepeat = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2617,8 +2619,8 @@ void onMotorcycleHit(int snum, int var60)
|
||||||
else
|
else
|
||||||
fi.guts(&sprite[var60], RRTILE2465, 3, myconnectindex);
|
fi.guts(&sprite[var60], RRTILE2465, 3, myconnectindex);
|
||||||
fi.guts(&sprite[var60], RRTILE2465, 3, myconnectindex);
|
fi.guts(&sprite[var60], RRTILE2465, 3, myconnectindex);
|
||||||
sprite[var60].xrepeat = 0;
|
s->xrepeat = 0;
|
||||||
sprite[var60].yrepeat = 0;
|
s->yrepeat = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2631,20 +2633,23 @@ void onMotorcycleHit(int snum, int var60)
|
||||||
void onBoatHit(int snum, int var60)
|
void onBoatHit(int snum, int var60)
|
||||||
{
|
{
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
if (badguy(&sprite[var60]) || sprite[var60].picnum == APLAYER)
|
auto s = &sprite[var60];
|
||||||
|
auto ht = &hittype[var60];
|
||||||
|
|
||||||
|
if (badguy(s) || s->picnum == APLAYER)
|
||||||
{
|
{
|
||||||
if (sprite[var60].picnum != APLAYER)
|
if (s->picnum != APLAYER)
|
||||||
{
|
{
|
||||||
if (numplayers == 1)
|
if (numplayers == 1)
|
||||||
{
|
{
|
||||||
fi.movesprite(var60, sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild() + 512) & 2047] >> 9,
|
fi.movesprite(var60, sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild() + 512) & 2047] >> 9,
|
||||||
sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild()) & 2047] >> 9, sprite[var60].zvel, CLIPMASK0);
|
sintable[int(p->TiltStatus * 20 + p->angle.ang.asbuild()) & 2047] >> 9, s->zvel, CLIPMASK0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hittype[var60].owner = p->i;
|
ht->owner = p->i;
|
||||||
hittype[var60].picnum = MOTOHIT;
|
ht->picnum = MOTOHIT;
|
||||||
hittype[var60].extra = p->MotoSpeed >> 2;
|
ht->extra = p->MotoSpeed >> 2;
|
||||||
p->MotoSpeed -= p->MotoSpeed >> 2;
|
p->MotoSpeed -= p->MotoSpeed >> 2;
|
||||||
p->TurbCount = 6;
|
p->TurbCount = 6;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue