mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-22 11:31:11 +00:00
- 6 more loops.
This commit is contained in:
parent
d8a7821b4f
commit
7aca51a6c4
3 changed files with 27 additions and 27 deletions
|
@ -412,11 +412,11 @@ static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixed
|
||||||
{
|
{
|
||||||
tgsect = geosector[gs];
|
tgsect = geosector[gs];
|
||||||
|
|
||||||
SectIterator it(tgsect);
|
DukeSectIterator it(tgsect);
|
||||||
while ((spr = it.NextIndex()) >= 0)
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
changespritesect((short)spr, geosectorwarp[gs]);
|
changespritesect(act, geosectorwarp[gs]);
|
||||||
setsprite((short)spr, sprite[spr].x -= geox[gs], sprite[spr].y -= geoy[gs], sprite[spr].z);
|
setsprite(act, act->s.x -= geox[gs], act->s.y -= geoy[gs], act->s.z);
|
||||||
}
|
}
|
||||||
if (geosector[gs] == sect)
|
if (geosector[gs] == sect)
|
||||||
{
|
{
|
||||||
|
@ -432,11 +432,11 @@ static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixed
|
||||||
for (gs = 0; gs < geocnt; gs++)
|
for (gs = 0; gs < geocnt; gs++)
|
||||||
{
|
{
|
||||||
tgsect = geosectorwarp[gs];
|
tgsect = geosectorwarp[gs];
|
||||||
SectIterator it(tgsect);
|
DukeSectIterator it(tgsect);
|
||||||
while ((spr = it.NextIndex()) >= 0)
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
changespritesect((short)spr, geosector[gs]);
|
changespritesect(act, geosector[gs]);
|
||||||
setsprite((short)spr, sprite[spr].x += geox[gs], sprite[spr].y += geoy[gs], sprite[spr].z);
|
setsprite(act, act->s.x += geox[gs], act->s.y += geoy[gs], act->s.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fi.animatesprites(cposx, cposy, cang.asbuild(), smoothratio);
|
fi.animatesprites(cposx, cposy, cang.asbuild(), smoothratio);
|
||||||
|
@ -444,11 +444,11 @@ static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixed
|
||||||
for (gs = 0; gs < geocnt; gs++)
|
for (gs = 0; gs < geocnt; gs++)
|
||||||
{
|
{
|
||||||
tgsect = geosector[gs];
|
tgsect = geosector[gs];
|
||||||
SectIterator it(tgsect);
|
DukeSectIterator it(tgsect);
|
||||||
while ((spr = it.NextIndex()) >= 0)
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
changespritesect((short)spr, geosectorwarp2[gs]);
|
changespritesect(act, geosectorwarp2[gs]);
|
||||||
setsprite((short)spr, sprite[spr].x -= geox2[gs], sprite[spr].y -= geoy2[gs], sprite[spr].z);
|
setsprite(act, act->s.x -= geox2[gs], act->s.y -= geoy2[gs], act->s.z);
|
||||||
}
|
}
|
||||||
if (geosector[gs] == sect)
|
if (geosector[gs] == sect)
|
||||||
{
|
{
|
||||||
|
@ -464,11 +464,11 @@ static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixed
|
||||||
for (gs = 0; gs < geocnt; gs++)
|
for (gs = 0; gs < geocnt; gs++)
|
||||||
{
|
{
|
||||||
tgsect = geosectorwarp2[gs];
|
tgsect = geosectorwarp2[gs];
|
||||||
SectIterator it(tgsect);
|
DukeSectIterator it(tgsect);
|
||||||
while ((spr = it.NextIndex()) >= 0)
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
changespritesect((short)spr, geosector[gs]);
|
changespritesect(act, geosector[gs]);
|
||||||
setsprite((short)spr, sprite[spr].x += geox2[gs], sprite[spr].y += geoy2[gs], sprite[spr].z);
|
setsprite(act, act->s.x += geox2[gs], act->s.y += geoy2[gs], act->s.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fi.animatesprites(cposx, cposy, cang.asbuild(), smoothratio);
|
fi.animatesprites(cposx, cposy, cang.asbuild(), smoothratio);
|
||||||
|
@ -594,12 +594,13 @@ void displayrooms(int snum, double smoothratio)
|
||||||
|
|
||||||
if (p->newowner >= 0)
|
if (p->newowner >= 0)
|
||||||
{
|
{
|
||||||
|
auto spr = &sprite[p->newowner];
|
||||||
cang = buildang(getcamspriteang(p->newowner, smoothratio));
|
cang = buildang(getcamspriteang(p->newowner, smoothratio));
|
||||||
choriz = buildhoriz(sprite[p->newowner].shade);
|
choriz = buildhoriz(spr->shade);
|
||||||
cposx = sprite[p->newowner].pos.x;
|
cposx = spr->pos.x;
|
||||||
cposy = sprite[p->newowner].pos.y;
|
cposy = spr->pos.y;
|
||||||
cposz = sprite[p->newowner].pos.z;
|
cposz = spr->pos.z;
|
||||||
sect = sprite[p->newowner].sectnum;
|
sect = spr->sectnum;
|
||||||
rotscrnang = buildlook(0);
|
rotscrnang = buildlook(0);
|
||||||
smoothratio = MaxSmoothRatio;
|
smoothratio = MaxSmoothRatio;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "gamestate.h"
|
#include "gamestate.h"
|
||||||
|
#include "dukeactor.h"
|
||||||
|
|
||||||
extern FixedBitArray<MAXSPRITES> activeSprites;
|
extern FixedBitArray<MAXSPRITES> activeSprites;
|
||||||
|
|
||||||
|
@ -60,12 +61,11 @@ static void recreateinterpolations()
|
||||||
{
|
{
|
||||||
numinterpolations = 0;
|
numinterpolations = 0;
|
||||||
|
|
||||||
int k;
|
DukeStatIterator it(STAT_EFFECTOR);
|
||||||
StatIterator it(STAT_EFFECTOR);
|
while (auto k = it.Next())
|
||||||
while ((k = it.NextIndex()) >= 0)
|
|
||||||
{
|
{
|
||||||
auto sectnum = sprite[k].sectnum;
|
auto sectnum = k->s.sectnum;
|
||||||
switch (sprite[k].lotag)
|
switch (k->s.lotag)
|
||||||
{
|
{
|
||||||
case SE_31_FLOOR_RISE_FALL:
|
case SE_31_FLOOR_RISE_FALL:
|
||||||
setinterpolation(§or[sectnum].floorz);
|
setinterpolation(§or[sectnum].floorz);
|
||||||
|
|
|
@ -574,7 +574,6 @@ static void handle_st09(int sn, DDukeActor* actor)
|
||||||
static void handle_st15(int sn, DDukeActor* actor)
|
static void handle_st15(int sn, DDukeActor* actor)
|
||||||
{
|
{
|
||||||
if (actor->s.picnum != TILE_APLAYER) return;
|
if (actor->s.picnum != TILE_APLAYER) return;
|
||||||
// if(ps[sprite[ii].yvel].select_dir == 1) return;
|
|
||||||
|
|
||||||
sectortype* sptr = §or[sn];
|
sectortype* sptr = §or[sn];
|
||||||
DukeSectIterator it(sn);
|
DukeSectIterator it(sn);
|
||||||
|
|
Loading…
Reference in a new issue