mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-28 14:11:13 +00:00
- Duke: Remove a few redundant sprite backups and change some backups to what's actually needed.
This commit is contained in:
parent
97159c20c1
commit
18fbc8996b
3 changed files with 11 additions and 35 deletions
|
@ -501,8 +501,6 @@ void moveplayers(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
spri->backuppos();
|
|
||||||
|
|
||||||
spri->cstat = 0;
|
spri->cstat = 0;
|
||||||
|
|
||||||
if (spri->xrepeat < 42)
|
if (spri->xrepeat < 42)
|
||||||
|
@ -3068,16 +3066,6 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
||||||
s->ang += 1024;
|
s->ang += 1024;
|
||||||
t[4] = 0;
|
t[4] = 0;
|
||||||
fi.operateforcefields(actor, s->hitag);
|
fi.operateforcefields(actor, s->hitag);
|
||||||
|
|
||||||
DukeSectIterator it(s->sectnum);
|
|
||||||
while (auto a2 = it.Next())
|
|
||||||
{
|
|
||||||
if (a2->s.picnum != SECTOREFFECTOR && a2->s.picnum != LOCATORS)
|
|
||||||
{
|
|
||||||
a2->s.backupvec2();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3138,11 +3126,6 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
||||||
auto spa2 = &a2->s;
|
auto spa2 = &a2->s;
|
||||||
if (spa2->picnum != SECTOREFFECTOR && spa2->picnum != LOCATORS)
|
if (spa2->picnum != SECTOREFFECTOR && spa2->picnum != LOCATORS)
|
||||||
{
|
{
|
||||||
if (numplayers < 2)
|
|
||||||
{
|
|
||||||
spa2->backupvec2();
|
|
||||||
}
|
|
||||||
|
|
||||||
spa2->x += l;
|
spa2->x += l;
|
||||||
spa2->y += x;
|
spa2->y += x;
|
||||||
|
|
||||||
|
@ -4053,7 +4036,7 @@ void handle_se17(DDukeActor* actor)
|
||||||
spr3->y += spr2->y - s->y;
|
spr3->y += spr2->y - s->y;
|
||||||
spr3->z = sector[spr2->sectnum].floorz - (sc->floorz - spr3->z);
|
spr3->z = sector[spr2->sectnum].floorz - (sc->floorz - spr3->z);
|
||||||
|
|
||||||
spr3->backuppos();
|
spr3->backupz();
|
||||||
|
|
||||||
changespritesect(act3, spr2->sectnum);
|
changespritesect(act3, spr2->sectnum);
|
||||||
setsprite(act3, spr3->pos);
|
setsprite(act3, spr3->pos);
|
||||||
|
@ -4106,7 +4089,6 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
||||||
if (a2->s.zvel == 0 && a2->s.statnum != STAT_EFFECTOR && a2->s.statnum != STAT_PROJECTILE)
|
if (a2->s.zvel == 0 && a2->s.statnum != STAT_EFFECTOR && a2->s.statnum != STAT_PROJECTILE)
|
||||||
{
|
{
|
||||||
a2->s.z += sc->extra;
|
a2->s.z += sc->extra;
|
||||||
a2->s.backupz();
|
|
||||||
a2->floorz = sc->floorz;
|
a2->floorz = sc->floorz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4144,7 +4126,6 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
||||||
if (a2->s.zvel == 0 && a2->s.statnum != STAT_EFFECTOR && a2->s.statnum != STAT_PROJECTILE)
|
if (a2->s.zvel == 0 && a2->s.statnum != STAT_EFFECTOR && a2->s.statnum != STAT_PROJECTILE)
|
||||||
{
|
{
|
||||||
a2->s.z -= sc->extra;
|
a2->s.z -= sc->extra;
|
||||||
a2->s.backupz();
|
|
||||||
a2->floorz = sc->floorz;
|
a2->floorz = sc->floorz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4430,11 +4411,8 @@ void handle_se26(DDukeActor* actor)
|
||||||
{
|
{
|
||||||
if (a2->s.statnum != 3 && a2->s.statnum != 10)
|
if (a2->s.statnum != 3 && a2->s.statnum != 10)
|
||||||
{
|
{
|
||||||
a2->s.backupvec2();
|
|
||||||
|
|
||||||
a2->s.x += l;
|
a2->s.x += l;
|
||||||
a2->s.y += x;
|
a2->s.y += x;
|
||||||
|
|
||||||
a2->s.z += s->zvel;
|
a2->s.z += s->zvel;
|
||||||
setsprite(a2, a2->s.pos);
|
setsprite(a2, a2->s.pos);
|
||||||
}
|
}
|
||||||
|
@ -4566,8 +4544,6 @@ void handle_se24(DDukeActor *actor, int16_t *list1, int16_t *list2, int TRIPBOMB
|
||||||
{
|
{
|
||||||
if (s2->z > (a2->floorz - (16 << 8)))
|
if (s2->z > (a2->floorz - (16 << 8)))
|
||||||
{
|
{
|
||||||
s2->backupvec2();
|
|
||||||
|
|
||||||
s2->x += x >> shift;
|
s2->x += x >> shift;
|
||||||
s2->y += l >> shift;
|
s2->y += l >> shift;
|
||||||
|
|
||||||
|
|
|
@ -2238,7 +2238,7 @@ void movetransports_d(void)
|
||||||
spr2->z -= spr->z - sector[Owner->s.sectnum].floorz;
|
spr2->z -= spr->z - sector[Owner->s.sectnum].floorz;
|
||||||
spr2->ang = Owner->s.ang;
|
spr2->ang = Owner->s.ang;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupang();
|
||||||
|
|
||||||
if (spr->pal == 0)
|
if (spr->pal == 0)
|
||||||
{
|
{
|
||||||
|
@ -2264,7 +2264,7 @@ void movetransports_d(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = Owner->s.z + 4096;
|
spr2->z = Owner->s.z + 4096;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
}
|
}
|
||||||
|
@ -2274,7 +2274,7 @@ void movetransports_d(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = sector[Owner->s.sectnum].ceilingz + ll;
|
spr2->z = sector[Owner->s.sectnum].ceilingz + ll;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
|
|
||||||
|
@ -2284,7 +2284,7 @@ void movetransports_d(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = sector[Owner->s.sectnum].floorz - ll;
|
spr2->z = sector[Owner->s.sectnum].floorz - ll;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
|
|
||||||
|
|
|
@ -1846,7 +1846,7 @@ void movetransports_r(void)
|
||||||
spr2->z -= spr->z - sector[Owner->s.sectnum].floorz;
|
spr2->z -= spr->z - sector[Owner->s.sectnum].floorz;
|
||||||
spr2->ang = Owner->s.ang;
|
spr2->ang = Owner->s.ang;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupang();
|
||||||
|
|
||||||
auto beam = spawn(act, TRANSPORTERBEAM);
|
auto beam = spawn(act, TRANSPORTERBEAM);
|
||||||
S_PlayActorSound(TELEPORTER, beam);
|
S_PlayActorSound(TELEPORTER, beam);
|
||||||
|
@ -1869,7 +1869,7 @@ void movetransports_r(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = Owner->s.z + 4096;
|
spr2->z = Owner->s.z + 4096;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
}
|
}
|
||||||
|
@ -1879,7 +1879,7 @@ void movetransports_r(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = sector[Owner->s.sectnum].ceilingz + ll;
|
spr2->z = sector[Owner->s.sectnum].ceilingz + ll;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
|
|
||||||
|
@ -1889,7 +1889,7 @@ void movetransports_r(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = sector[Owner->s.sectnum].floorz - ll;
|
spr2->z = sector[Owner->s.sectnum].floorz - ll;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
|
|
||||||
|
@ -1901,7 +1901,7 @@ void movetransports_r(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = sector[Owner->s.sectnum].ceilingz + ll2;
|
spr2->z = sector[Owner->s.sectnum].ceilingz + ll2;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
|
|
||||||
|
@ -1915,7 +1915,7 @@ void movetransports_r(void)
|
||||||
spr2->y += (Owner->s.y - spr->y);
|
spr2->y += (Owner->s.y - spr->y);
|
||||||
spr2->z = sector[Owner->s.sectnum].floorz - ll2;
|
spr2->z = sector[Owner->s.sectnum].floorz - ll2;
|
||||||
|
|
||||||
spr2->backuppos();
|
spr2->backupz();
|
||||||
|
|
||||||
changespritesect(act2, Owner->s.sectnum);
|
changespritesect(act2, Owner->s.sectnum);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue