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