- removed the non-Blood float_* access wrappers

This commit is contained in:
Christoph Oelckers 2022-09-03 10:03:30 +02:00
parent 62ba753585
commit 6fd8dae380
26 changed files with 158 additions and 173 deletions

View file

@ -118,11 +118,6 @@ public:
return vel.Z * zworldtoint;
}
double float_zvel() const
{
return vel.Z;
}
void set_int_zvel(int v)
{
vel.Z = v * zinttoworld;
@ -144,11 +139,6 @@ public:
return vel.X * worldtoint;
}
double float_xvel() const
{
return vel.X;
}
void set_int_xvel(int v)
{
vel.X = v * inttoworld;
@ -170,11 +160,6 @@ public:
return vel.Y * worldtoint;
}
double float_yvel() const
{
return vel.Y;
}
void set_int_yvel(int v)
{
vel.Y = v * inttoworld;

View file

@ -278,8 +278,8 @@ void lotsofstuff(DDukeActor* actor, int n, int spawntype)
void ms(DDukeActor* const actor)
{
//T1,T2 and T3 are used for all the sector moving stuff!!!
actor->spr.pos.X += actor->float_xvel() * actor->spr.angle.Cos();
actor->spr.pos.Y += actor->float_xvel() * actor->spr.angle.Sin();
actor->spr.pos.X += actor->vel.X * actor->spr.angle.Cos();
actor->spr.pos.Y += actor->vel.X * actor->spr.angle.Sin();
int j = actor->temp_data[1];
int k = actor->temp_data[2];
@ -490,7 +490,7 @@ void moveplayers(void)
act->spr.yrepeat = 36;
if (act->sector()->lotag != ST_2_UNDERWATER)
makeitfall(act);
if (act->float_zvel() == 0 && act->sector()->lotag == ST_1_ABOVE_WATER)
if (act->vel.Z == 0 && act->sector()->lotag == ST_1_ABOVE_WATER)
act->spr.pos.Z += 32;
}
@ -628,7 +628,7 @@ void movecrane(DDukeActor *actor, int crane)
//actor->temp_data[0] = state
//actor->temp_data[1] = checking sector number
if(actor->float_xvel() != 0) getglobalz(actor);
if(actor->vel.X != 0) getglobalz(actor);
if (actor->temp_data[0] == 0) //Waiting to check the sector
{
@ -1029,9 +1029,9 @@ void movewaterdrip(DDukeActor *actor, int drip)
{
makeitfall(actor);
ssp(actor, CLIPMASK0);
if(actor->float_xvel() > 0) actor->add_int_xvel(-2);
if(actor->vel.X > 0) actor->add_int_xvel(-2);
if (actor->float_zvel() == 0)
if (actor->vel.Z == 0)
{
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
@ -1365,7 +1365,7 @@ void rpgexplode(DDukeActor *actor, int hit, const DVector3 &pos, int EXPLOSION2,
}
else if (hit == kHitSector)
{
if (actor->float_zvel() > 0 && EXPLOSION2BOT >= 0)
if (actor->vel.Z > 0 && EXPLOSION2BOT >= 0)
spawn(actor, EXPLOSION2BOT);
else
{
@ -1448,7 +1448,7 @@ bool rat(DDukeActor* actor, bool makesound)
bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
{
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
DukeStatIterator it(STAT_DEFAULT);
while (auto aa = it.Next())
@ -1481,11 +1481,11 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
}
actor->add_int_xvel(-1);
if(actor->float_xvel() < 0) actor->vel.X = 0;
if(actor->vel.X < 0) actor->vel.X = 0;
if (actor->spr.picnum == stripeball)
{
actor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
actor->spr.cstat |= (CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP) & ESpriteFlags::FromInt(int(actor->float_xvel() / 16.)); // special hack edition...
actor->spr.cstat |= (CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP) & ESpriteFlags::FromInt(int(actor->vel.X / 16.)); // special hack edition...
}
}
else
@ -1567,7 +1567,7 @@ void forcesphere(DDukeActor* actor, int forcesphere)
if (actor->temp_data[3] > 0)
{
if (actor->float_zvel() < 24)
if (actor->vel.Z < 24)
actor->add_int_zvel( 192);
actor->spr.pos.Z += actor->int_zvel() * inttoworld;
if (actor->spr.pos.Z > sectp->floorz)
@ -1686,7 +1686,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
else if (actor->temp_data[0] == 2 || actor->temp_data[0] == 3)
{
actor->temp_data[3] = 0;
if(actor->float_xvel() > 0) actor->add_int_xvel(-16);
if(actor->vel.X > 0) actor->add_int_xvel(-16);
else actor->vel.X = 0;
if (actor->temp_data[0] == 2)
@ -1733,7 +1733,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
if (l > 1524) { if (actor->int_xvel() < 256) actor->add_int_xvel( 32); }
else
{
if(actor->float_xvel() > 0) actor->add_int_xvel(-16);
if(actor->vel.X > 0) actor->add_int_xvel(-16);
else actor->vel.X = 0;
}
}
@ -2101,11 +2101,11 @@ bool money(DDukeActor* actor, int BLOODPOOL)
{
if (sectp->lotag == 2)
{
if (actor->float_zvel() < 0.25)
if (actor->vel.Z < 0.25)
actor->add_int_zvel( (gs.gravity >> 5) + (krand() & 7));
}
else
if (actor->float_zvel() < 0.5625)
if (actor->vel.Z < 0.5625)
actor->add_int_zvel( (gs.gravity >> 5) + (krand() & 7));
}
@ -2152,7 +2152,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
{
auto sectp = actor->sector();
if(actor->float_xvel() > 0) actor->add_int_xvel(-1);
if(actor->vel.X > 0) actor->add_int_xvel(-1);
else actor->vel.X = 0;
if (timeout)
@ -2166,7 +2166,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
}
}
if (actor->float_zvel() > 4 && actor->float_zvel() < 5)
if (actor->vel.Z > 4 && actor->vel.Z < 5)
{
SetActor(actor, actor->spr.pos);
sectp = actor->sector();
@ -2208,11 +2208,11 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
}
}
if (actor->float_zvel() < 24)
if (actor->vel.Z < 24)
{
if (sectp->lotag == 2)
{
if (actor->float_zvel() < 4)
if (actor->vel.Z < 4)
actor->add_int_zvel( 48);
else actor->set_int_zvel(1024);
}
@ -2220,7 +2220,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
}
actor->add_int_pos({ MulScale(actor->int_xvel(), bcos(actor->int_ang()), 14), MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14), 0 });
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
if (floorcheck && actor->spr.pos.Z >= actor->sector()->floorz)
{
@ -2381,9 +2381,9 @@ void shell(DDukeActor* actor, bool morecheck)
actor->temp_data[0]++;
actor->temp_data[0] &= 3;
}
if (actor->float_zvel() < 0.5) actor->add_int_zvel( (gs.gravity / 13)); // 8
if (actor->vel.Z < 0.5) actor->add_int_zvel( (gs.gravity / 13)); // 8
else actor->add_int_zvel(- 64);
if(actor->float_xvel() > 0)
if(actor->vel.X > 0)
actor->add_int_xvel(-4);
else actor->vel.X = 0;
}
@ -2396,8 +2396,8 @@ void shell(DDukeActor* actor, bool morecheck)
actor->temp_data[0]++;
actor->temp_data[0] &= 3;
}
if (actor->float_zvel() < 2) actor->add_int_zvel( (gs.gravity / 3)); // 52;
if(actor->float_xvel() > 0)
if (actor->vel.Z < 2) actor->add_int_zvel( (gs.gravity / 3)); // 52;
if(actor->vel.X > 0)
actor->add_int_xvel(-1);
else
{
@ -2418,7 +2418,7 @@ void glasspieces(DDukeActor* actor)
makeitfall(actor);
if (actor->float_zvel() > 16) actor->set_int_zvel(4096);
if (actor->vel.Z > 16) actor->set_int_zvel(4096);
if (!actor->insector())
{
deletesprite(actor);
@ -2442,11 +2442,11 @@ void glasspieces(DDukeActor* actor)
return;
}
if(actor->float_xvel() > 0)
if(actor->vel.X > 0)
{
actor->add_int_xvel(-2);
static const ESpriteFlags flips[] = { 0, CSTAT_SPRITE_XFLIP, CSTAT_SPRITE_YFLIP, CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP };
actor->spr.cstat = flips[int(actor->float_xvel() * 16) & 3];
actor->spr.cstat = flips[int(actor->vel.X * 16) & 3];
}
else actor->vel.X = 0;
@ -2463,11 +2463,11 @@ void scrap(DDukeActor* actor, int SCRAP1, int SCRAP6)
{
auto sectp = actor->sector();
if(actor->float_xvel() > 0)
if(actor->vel.X > 0)
actor->add_int_xvel(-1);
else actor->vel.X = 0;
if (actor->float_zvel() > 4 && actor->float_zvel() < 5)
if (actor->vel.Z > 4 && actor->vel.Z < 5)
{
SetActor(actor, actor->spr.pos);
sectp = actor->sector();
@ -2493,7 +2493,7 @@ void scrap(DDukeActor* actor, int SCRAP1, int SCRAP6)
else actor->temp_data[0]++;
}
}
if (actor->float_zvel() < 16) actor->add_int_zvel( gs.gravity - 50);
if (actor->vel.Z < 16) actor->add_int_zvel( gs.gravity - 50);
actor->add_int_pos({ MulScale(actor->int_xvel(), bcos(actor->int_ang()), 14), MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14), actor->int_zvel()});
}
else
@ -2769,7 +2769,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
}
Owner = actor->GetOwner();
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
int x = getangle(Owner->spr.pos.XY() - actor->spr.pos.XY());
int q = getincangle(actor->int_ang(), x) >> 3;
@ -2967,7 +2967,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
if (l <= 128)
actor->vel.X = 0;
if(actor->float_xvel() > 0)
if(actor->vel.X > 0)
actor->add_int_xvel(-16);
else
{
@ -2981,7 +2981,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
}
}
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
int l = MulScale(actor->int_xvel(), bcos(actor->int_ang()), 14);
int x = MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14);
@ -3357,9 +3357,9 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
}
}
actor->spr.pos.Z += actor->float_zvel();
sc->ceilingz = actor->float_zvel();
sector[actor->temp_data[0]].ceilingz = actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
sc->ceilingz = actor->vel.Z;
sector[actor->temp_data[0]].ceilingz = actor->vel.Z;
ms(actor);
//SetActor(actor, actor->spr.pos);
}
@ -3926,7 +3926,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
{
if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].pos.Z += extra;
}
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
{
a2->spr.pos.Z += extra;
a2->floorz = sc->floorz;
@ -3965,7 +3965,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
{
if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].pos.Z -= extra;
}
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
{
a2->spr.pos.Z -= extra;
a2->floorz = sc->floorz;
@ -4116,7 +4116,7 @@ void handle_se20(DDukeActor* actor)
if (actor->temp_data[0] == 1) actor->set_int_xvel(8);
else actor->set_int_xvel(-8);
if(actor->float_xvel() != 0) //Moving
if(actor->vel.X != 0) //Moving
{
int x = MulScale(actor->int_xvel(), bcos(actor->int_ang()), 14);
int l = MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14);
@ -4136,7 +4136,7 @@ void handle_se20(DDukeActor* actor)
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
{
if (a2->spr.statnum != 3 && a2->float_zvel() == 0)
if (a2->spr.statnum != 3 && a2->vel.Z == 0)
{
a2->add_int_pos({ x, l, 0 });
if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE)
@ -4235,7 +4235,7 @@ void handle_se22(DDukeActor* actor)
void handle_se26(DDukeActor* actor)
{
auto sc = actor->sector();
double zvel = actor->float_zvel();
double zvel = actor->vel.Z;
actor->set_int_xvel(32);
DVector2 vect = 2 * actor->spr.angle.ToVector(); // was: (32 * bsin) >> 14
@ -4348,7 +4348,7 @@ void handle_se24(DDukeActor *actor, bool scroll, int shift)
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
{
if (a2->float_zvel() >= 0)
if (a2->vel.Z >= 0)
{
switch (a2->spr.statnum)
{
@ -4657,7 +4657,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->isPlayer() && a2->GetOwner())
if (ps[a2->PlayerIndex()].on_ground == 1)
ps[a2->PlayerIndex()].player_add_int_z(l);
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(l);
a2->floorz = sec->floorz;
@ -4686,7 +4686,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->isPlayer() && a2->GetOwner())
if (ps[a2->PlayerIndex()].on_ground == 1)
ps[a2->PlayerIndex()].player_add_int_z(l);
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(l);
a2->floorz = sec->floorz;
@ -4717,7 +4717,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->isPlayer() && a2->GetOwner())
if (ps[a2->PlayerIndex()].on_ground == 1)
ps[a2->PlayerIndex()].player_add_int_z(l);
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(l);
a2->floorz = sec->floorz;
@ -4745,7 +4745,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->isPlayer() && a2->GetOwner())
if (ps[a2->PlayerIndex()].on_ground == 1)
ps[a2->PlayerIndex()].player_add_int_z(-l);
if (a2->float_zvel() == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(-l);
a2->floorz = sec->floorz;
@ -4847,12 +4847,12 @@ void makeitfall(DDukeActor* actor)
if( actor->spr.pos.Z < actor->floorz - FOURSLEIGHT_F)
{
if( actor->sector()->lotag == 2 && actor->float_zvel() > 3122/256.)
if( actor->sector()->lotag == 2 && actor->vel.Z > 3122/256.)
actor->set_int_zvel(3144);
if(actor->float_zvel() < 24)
if(actor->vel.Z < 24)
actor->add_int_zvel( c);
else actor->set_int_zvel(6144);
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
}
if (actor->spr.pos.Z >= actor->floorz - FOURSLEIGHT_F)
{
@ -4985,7 +4985,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
aang = actor->int_ang();
actor->add_int_xvel( (*moveptr - actor->int_xvel()) / 5);
if (actor->float_zvel() < (648/256.)) actor->add_int_zvel( ((*(moveptr + 1) << 4) - actor->int_zvel()) / 5);
if (actor->vel.Z < (648/256.)) actor->add_int_zvel( ((*(moveptr + 1) << 4) - actor->int_zvel()) / 5);
if (isRRRA() && (ang & windang))
actor->set_int_ang(WindDir);
@ -5005,7 +5005,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
else
goalang = getangle(Owner->spr.pos.XY() - actor->spr.pos.XY());
if (actor->float_xvel() != 0 && actor->spr.picnum != TILE_DRONE)
if (actor->vel.X != 0 && actor->spr.picnum != TILE_DRONE)
{
angdif = getincangle(aang, goalang);
@ -5080,9 +5080,9 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
if (actor->spr.pos.Z < actor->floorz - FOURSLEIGHT_F)
{
actor->add_int_zvel( c);
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
if (actor->float_zvel() > 24) actor->set_int_zvel(6144);
if (actor->vel.Z > 24) actor->set_int_zvel(6144);
}
else
{
@ -5091,7 +5091,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
if (badguy(actor) || (actor->isPlayer() && actor->GetOwner()))
{
if (actor->float_zvel() > (3084/256.) && actor->spr.extra <= 1)
if (actor->vel.Z > (3084/256.) && actor->spr.extra <= 1)
{
if (actor->spr.pal != 1 && actor->spr.picnum != DRONE)
{
@ -5116,7 +5116,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
actor->hitextra = 1;
actor->vel.Z = 0;
}
else if (actor->float_zvel() > 8 && actor->sector()->lotag != 1)
else if (actor->vel.Z > 8 && actor->sector()->lotag != 1)
{
auto sect = actor->sector();

View file

@ -473,7 +473,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
((actor->actorstayput != nullptr && actor->actorstayput != dasectp) ||
((actor->spr.picnum == BOSS2) && actor->spr.pal == 0 && dasectp->lotag != 3) ||
((actor->spr.picnum == BOSS1 || actor->spr.picnum == BOSS2) && dasectp->lotag == ST_1_ABOVE_WATER) ||
(dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == LIZMAN || (actor->spr.picnum == LIZTROOP && actor->float_zvel() == 0)))
(dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == LIZMAN || (actor->spr.picnum == LIZTROOP && actor->vel.Z == 0)))
))
)
{
@ -773,9 +773,9 @@ void movefallers_d(void)
if (act->spr.pos.Z < sectp->floorz - 1)
{
act->add_int_zvel( x);
if (act->float_zvel() > 24)
if (act->vel.Z > 24)
act->set_int_zvel(6144);
act->spr.pos.Z += act->float_zvel();
act->spr.pos.Z += act->vel.Z;
}
if ((sectp->floorz - act->spr.pos.Z) < 16)
{
@ -1337,7 +1337,7 @@ static bool movefireball(DDukeActor* actor)
}
actor->temp_data[0]++;
}
if (actor->float_zvel() < 15000./256.)
if (actor->vel.Z < 15000./256.)
actor->add_int_zvel( 200);
return false;
}
@ -1453,7 +1453,7 @@ static bool weaponhitsector(DDukeActor* proj, const DVector3& oldpos, bool fireb
{
SetActor(proj, oldpos);
if (proj->float_zvel() < 0)
if (proj->vel.Z < 0)
{
if (proj->sector()->ceilingstat & CSTAT_SECTOR_SKY)
if (proj->sector()->ceilingpal == 0)
@ -1591,7 +1591,7 @@ static void weaponcommon_d(DDukeActor* proj)
}
}
}
else if (proj->spr.picnum == SPIT) if (proj->float_zvel() < 24)
else if (proj->spr.picnum == SPIT) if (proj->vel.Z < 24)
proj->add_int_zvel( gs.gravity - 112);
if (coll.type != 0)
@ -1642,7 +1642,7 @@ static void weaponcommon_d(DDukeActor* proj)
spawned->spr.xrepeat = spawned->spr.yrepeat = proj->spr.xrepeat >> 1;
if (coll.type == kHitSector)
{
if (proj->float_zvel() < 0)
if (proj->vel.Z < 0)
{
spawned->spr.cstat |= CSTAT_SPRITE_YFLIP;
spawned->spr.pos.Z += 72;
@ -1704,7 +1704,7 @@ void moveweapons_d(void)
continue;
case FREEZEBLAST:
if (act->spr.yint < 1 || act->spr.extra < 2 || (act->float_xvel() == 0 && act->float_zvel() == 0))
if (act->spr.yint < 1 || act->spr.extra < 2 || (act->vel.X == 0 && act->vel.Z == 0))
{
auto spawned = spawn(act,TRANSPORTERSTAR);
if (spawned)
@ -2397,9 +2397,9 @@ static void greenslime(DDukeActor *actor)
actor->spr.picnum = GREENSLIME;
if (actor->spr.yrepeat < 40) actor->spr.yrepeat += 8;
if (actor->spr.xrepeat > 8) actor->spr.xrepeat -= 4;
if (actor->float_zvel() > -12)
if (actor->vel.Z > -12)
actor->add_int_zvel(- 348);
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
if (actor->spr.pos.Z < actor->ceilingz + 16)
{
actor->spr.pos.Z = actor->ceilingz + 16;
@ -2515,7 +2515,7 @@ static void flamethrowerflame(DDukeActor *actor)
else if (coll.type == kHitSector)
{
SetActor(actor, dapos);
if (actor->float_zvel() < 0)
if (actor->vel.Z < 0)
fi.checkhitceiling(actor->sector());
}
@ -2600,7 +2600,7 @@ static void heavyhbomb(DDukeActor *actor)
MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14),
actor->int_zvel(), CLIPMASK0, coll);
if (actor->sector()->lotag == 1 && actor->float_zvel() == 0)
if (actor->sector()->lotag == 1 && actor->vel.Z == 0)
{
actor->spr.pos.Z += 32;
if (actor->temp_data[5] == 0)
@ -2624,15 +2624,15 @@ static void heavyhbomb(DDukeActor *actor)
l = Owner->PlayerIndex();
else l = -1;
if(actor->float_xvel() > 0)
if(actor->vel.X > 0)
{
actor->add_int_xvel(-5);
if (sectp->lotag == 2)
actor->add_int_xvel(-10);
if(actor->float_xvel() < 0)
if(actor->vel.X < 0)
actor->vel.X = 0;
if (int(actor->float_xvel() * 16) & 8) actor->spr.cstat ^= CSTAT_SPRITE_XFLIP;
if (int(actor->vel.X * 16) & 8) actor->spr.cstat ^= CSTAT_SPRITE_XFLIP;
}
if (coll.type== kHitWall)
@ -2674,7 +2674,7 @@ DETONATEB:
fi.hitradius(actor, m, x >> 2, x >> 1, x - (x >> 2), x);
spawn(actor, EXPLOSION2);
if (actor->float_zvel() == 0) spawn(actor, EXPLOSION2BOT);
if (actor->vel.Z == 0) spawn(actor, EXPLOSION2BOT);
S_PlayActorSound(PIPEBOMB_EXPLODE, actor);
for (x = 0; x < 8; x++)
RANDOMSCRAP(actor);
@ -2834,7 +2834,7 @@ void moveactors_d(void)
case HELECOPT:
case DUKECAR:
act->spr.pos.Z += act->float_zvel();
act->spr.pos.Z += act->vel.Z;
act->temp_data[0]++;
if (act->temp_data[0] == 4) S_PlayActorSound(WAR_AMBIENCE2, act);
@ -3562,7 +3562,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
a = badguy(actor);
if (actor->float_xvel() != 0 || actor->int_zvel())
if (actor->vel.X != 0 || actor->int_zvel())
{
if (a && actor->spr.picnum != ROTATEGUN)
{
@ -3589,7 +3589,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
}
else
{
if (actor->float_zvel() > 0)
if (actor->vel.Z > 0)
{
double f = getflorzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
actor->floorz = f;
@ -3610,9 +3610,9 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
}
else if (actor->spr.picnum != ORGANTIC)
{
if (actor->float_zvel() > 0 && actor->floorz < actor->spr.pos.Z)
if (actor->vel.Z > 0 && actor->floorz < actor->spr.pos.Z)
actor->spr.pos.Z = actor->floorz;
if (actor->float_zvel() < 0)
if (actor->vel.Z < 0)
{
double c = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
if (actor->spr.pos.Z < c + 66)

View file

@ -691,9 +691,9 @@ void movefallers_r(void)
if (act->spr.pos.Z < sectp->floorz - 1)
{
act->add_int_zvel( x);
if (act->float_zvel() > 24)
if (act->vel.Z > 24)
act->set_int_zvel(6144);
act->spr.pos.Z += act->float_zvel();
act->spr.pos.Z += act->vel.Z;
}
if ((sectp->floorz - act->spr.pos.Z) < 16)
{
@ -955,7 +955,7 @@ static void chickenarrow(DDukeActor* actor)
actor->set_int_ang(ang);
if (actor->spr.hitag > 180)
if (actor->float_zvel() <= 0)
if (actor->vel.Z <= 0)
actor->add_int_zvel( 200);
}
}
@ -1135,7 +1135,7 @@ bool weaponhitsector(DDukeActor *proj, const DVector3& oldpos)
guts_r(proj, RABBITJIBC, 2, myconnectindex);
}
if (proj->float_zvel() < 0)
if (proj->vel.Z < 0)
{
if (proj->sector()->ceilingstat & CSTAT_SECTOR_SKY)
if (proj->sector()->ceilingpal == 0)
@ -1274,7 +1274,7 @@ static void weaponcommon_r(DDukeActor *proj)
}
}
}
else if (proj->spr.picnum == SPIT) if (proj->float_zvel() < 24)
else if (proj->spr.picnum == SPIT) if (proj->vel.Z < 24)
proj->add_int_zvel( gs.gravity - 112);
if (coll.type != 0)
@ -1305,7 +1305,7 @@ static void weaponcommon_r(DDukeActor *proj)
spawned->spr.xrepeat = spawned->spr.yrepeat = proj->spr.xrepeat >> 1;
if (coll.type == kHitSector)
{
if (proj->float_zvel() < 0)
if (proj->vel.Z < 0)
{
spawned->spr.cstat |= CSTAT_SPRITE_YFLIP;
spawned->spr.pos.Z += 72;
@ -1579,10 +1579,10 @@ void movetransports_r(void)
case STAT_MISC:
case STAT_DUMMYPLAYER:
ll = abs(act2->float_zvel());
ll = abs(act2->vel.Z);
if (isRRRA())
{
if (act2->float_zvel() >= 0)
if (act2->vel.Z >= 0)
warpdir = 2;
else
warpdir = 1;
@ -2379,7 +2379,7 @@ static void heavyhbomb(DDukeActor *actor)
MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14),
actor->int_zvel(), CLIPMASK0, coll);
if (actor->sector()->lotag == 1 && actor->float_zvel() == 0)
if (actor->sector()->lotag == 1 && actor->vel.Z == 0)
{
actor->spr.pos.Z += 32;
if (actor->temp_data[5] == 0)
@ -2414,15 +2414,15 @@ static void heavyhbomb(DDukeActor *actor)
l = Owner->PlayerIndex();
else l = -1;
if(actor->float_xvel() > 0)
if(actor->vel.X > 0)
{
actor->add_int_xvel(-5);
if (sectp->lotag == 2)
actor->add_int_xvel(-10);
if(actor->float_xvel() < 0)
if(actor->vel.X < 0)
actor->vel.X = 0;
if (int(actor->float_xvel() * 16) & 8) actor->spr.cstat ^= CSTAT_SPRITE_XFLIP;
if (int(actor->vel.X * 16) & 8) actor->spr.cstat ^= CSTAT_SPRITE_XFLIP;
}
if (coll.type == kHitWall)
@ -2558,7 +2558,7 @@ static int henstand(DDukeActor *actor)
}
if (actor->sector()->lotag == 900)
actor->vel.X = 0;
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
makeitfall(actor);
Collision coll;
@ -2591,19 +2591,19 @@ static int henstand(DDukeActor *actor)
}
}
actor->add_int_xvel(-1);
if(actor->float_xvel() < 0) actor->vel.X = 0;
if(actor->vel.X < 0) actor->vel.X = 0;
actor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
if (actor->spr.picnum == BOWLINGPIN)
{
actor->spr.cstat |= CSTAT_SPRITE_XFLIP & ESpriteFlags::FromInt(int(actor->float_xvel() * 16));
actor->spr.cstat |= CSTAT_SPRITE_YFLIP & ESpriteFlags::FromInt(int(actor->float_xvel() * 16));
actor->spr.cstat |= CSTAT_SPRITE_XFLIP & ESpriteFlags::FromInt(int(actor->vel.X * 16));
actor->spr.cstat |= CSTAT_SPRITE_YFLIP & ESpriteFlags::FromInt(int(actor->vel.X * 16));
if (krand() & 1)
actor->spr.picnum = BOWLINGPIN + 1;
}
else if (actor->spr.picnum == HENSTAND)
{
actor->spr.cstat |= CSTAT_SPRITE_XFLIP & ESpriteFlags::FromInt(int(actor->float_xvel() * 16));
actor->spr.cstat |= CSTAT_SPRITE_YFLIP & ESpriteFlags::FromInt(int(actor->float_xvel() * 16));
actor->spr.cstat |= CSTAT_SPRITE_XFLIP & ESpriteFlags::FromInt(int(actor->vel.X * 16));
actor->spr.cstat |= CSTAT_SPRITE_YFLIP & ESpriteFlags::FromInt(int(actor->vel.X * 16));
if (krand() & 1)
actor->spr.picnum = HENSTAND + 1;
if (!actor->int_xvel())
@ -3633,13 +3633,13 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
a = badguy(actor);
if (actor->float_xvel() != 0 || actor->float_zvel() != 0)
if (actor->vel.X != 0 || actor->vel.Z != 0)
{
if (a)
{
if (actor->spr.picnum == DRONE && actor->spr.extra > 0)
{
if (actor->float_zvel() > 0)
if (actor->vel.Z > 0)
{
double dist = isRRRA() ? 28 : 30;
double f = getflorzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
@ -3658,9 +3658,9 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
}
}
}
if (actor->float_zvel() > 0 && actor->floorz < actor->spr.pos.Z)
if (actor->vel.Z > 0 && actor->floorz < actor->spr.pos.Z)
actor->spr.pos.Z = actor->floorz;
if (actor->float_zvel() < 0)
if (actor->vel.Z < 0)
{
double c = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
if (actor->spr.pos.Z < c + 66)

View file

@ -185,7 +185,7 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, DVector3 spos, DAng
// WTF???
DAngle myang = (DAngle90 - (DAngle180 - fabs(fabs(VecToAngle(spos.XY() - ps[p].pos.XY()) - sang) - DAngle180)));
if (ps[p].GetActor()->float_xvel() != 0)
if (ps[p].GetActor()->vel.X != 0)
vel = (int)((myang.Buildang() * 0.001953125f * ps[p].GetActor()->int_xvel()) + 400);
if (actor->sector()->lotag == 2 && (krand() % 5) == 0)
spawned = spawn(actor, WATERBUBBLE);
@ -3079,7 +3079,7 @@ HORIZONLY:
if (ud.clipping == 0 && psectp->lotag == 31)
{
auto secact = barrier_cast<DDukeActor*>(psectp->hitagactor);
if (secact && secact->float_xvel() != 0 && secact->temp_data[0] == 0)
if (secact && secact->vel.X != 0 && secact->temp_data[0] == 0)
{
quickkill(p);
return;

View file

@ -3913,7 +3913,7 @@ HORIZONLY:
if (ud.clipping == 0 && psectp->lotag == ST_31_TWO_WAY_TRAIN)
{
auto act = barrier_cast<DDukeActor*>(psectp->hitagactor);
if (act && act->float_xvel() != 0 && act->temp_data[0] == 0)
if (act && act->vel.X != 0 && act->temp_data[0] == 0)
{
quickkill(p);
return;

View file

@ -87,7 +87,7 @@ void AIBubble::Tick(RunListEvent* ev)
pActor->nFrame = 0;
}
pActor->spr.pos.Z = pActor->float_zvel();
pActor->spr.pos.Z = pActor->vel.Z;
auto pSector = pActor->sector();

View file

@ -301,7 +301,7 @@ void AIGrenade::Tick(RunListEvent* ev)
pActor->set_int_zvel(-(zVel >> 1));
if (pActor->float_zvel() > -5)
if (pActor->vel.Z > -5)
{
D3PlayFX(StaticSound[kSound5], pActor);
pActor->nCount = 0;

View file

@ -572,9 +572,9 @@ void Gravity(DExhumedActor* pActor)
{
if (pActor->spr.statnum != 100)
{
if (pActor->float_zvel() <= 4)
if (pActor->vel.Z <= 4)
{
if (pActor->float_zvel() < 8) {
if (pActor->vel.Z < 8) {
pActor->add_int_zvel( 512);
}
}
@ -585,17 +585,17 @@ void Gravity(DExhumedActor* pActor)
}
else
{
if (pActor->float_zvel() > 0)
if (pActor->vel.Z > 0)
{
pActor->add_int_zvel(- 64);
if (pActor->float_zvel() < 0) {
if (pActor->vel.Z < 0) {
pActor->vel.Z = 0;
}
}
else if (pActor->float_zvel() < 0)
else if (pActor->vel.Z < 0)
{
pActor->add_int_zvel( 64);
if (pActor->float_zvel() > 0) {
if (pActor->vel.Z > 0) {
pActor->vel.Z = 0;
}
}
@ -604,7 +604,7 @@ void Gravity(DExhumedActor* pActor)
else
{
pActor->add_int_zvel( 512);
if (pActor->float_zvel() > 64) {
if (pActor->vel.Z > 64) {
pActor->set_int_zvel(16384);
}
}

View file

@ -222,34 +222,34 @@ void AIMummy::Tick(RunListEvent* ev)
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
}
if (pActor->float_xvel() != 0 || pActor->float_yvel() != 0)
if (pActor->vel.X != 0 || pActor->vel.Y != 0)
{
if (pActor->float_xvel() > 0)
if (pActor->vel.X > 0)
{
pActor->add_int_xvel(-1024);
if (pActor->float_xvel() < 0) {
if (pActor->vel.X < 0) {
pActor->vel.X = 0;
}
}
else if (pActor->float_xvel() < 0)
else if (pActor->vel.X < 0)
{
pActor->add_int_xvel( 1024);
if (pActor->float_xvel() > 0) {
if (pActor->vel.X > 0) {
pActor->vel.X = 0;
}
}
if (pActor->float_yvel() > 0)
if (pActor->vel.Y > 0)
{
pActor->add_int_yvel(-1024);
if (pActor->float_yvel() < 0) {
if (pActor->vel.Y < 0) {
pActor->vel.Y = 0;
}
}
else if (pActor->float_yvel() < 0)
else if (pActor->vel.Y < 0)
{
pActor->add_int_yvel(1024);
if (pActor->float_yvel() > 0) {
if (pActor->vel.Y > 0) {
pActor->vel.Y = 0;
}
}

View file

@ -1441,7 +1441,7 @@ void AISpark::Tick(RunListEvent* ev)
return;
}
if (pActor->float_zvel() <= 0) {
if (pActor->vel.Z <= 0) {
return;
}
}

View file

@ -834,7 +834,7 @@ void AIPlayer::Tick(RunListEvent* ev)
Gravity(pPlayerActor);
if (pPlayerActor->float_zvel() >= 6500/256. && zVel < 6500)
if (pPlayerActor->vel.Z >= 6500/256. && zVel < 6500)
{
D3PlayFX(StaticSound[kSound17], pPlayerActor);
}
@ -850,7 +850,7 @@ void AIPlayer::Tick(RunListEvent* ev)
int y = (sPlayerInput[nPlayer].yVel * 4) >> 2;
int z = (pPlayerActor->int_zvel() * 4) >> 2;
if (pPlayerActor->float_zvel() > 32)
if (pPlayerActor->vel.Z > 32)
pPlayerActor->set_int_zvel(8192);
if (PlayerList[nPlayer].bIsMummified)

View file

@ -620,7 +620,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
if (nMov.exbits & kHitAux2)
{
pActor->set_int_zvel(-(pActor->int_zvel() - 256));
if (pActor->float_zvel() < -2)
if (pActor->vel.Z < -2)
{
pActor->vel.Z = 0;
}
@ -799,7 +799,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
{
pActor->set_int_zvel(-(pActor->int_zvel() >> 1));
if (pActor->float_zvel() > -1)
if (pActor->vel.Z > -1)
{
nVelShift = 100;
pActor->vel.Z = 0;
@ -819,7 +819,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
pActor->vel.X = 0;
pActor->vel.Y = 0;
if (pActor->float_zvel() == 0)
if (pActor->vel.Z == 0)
{
QueenHead.nIndex = 120;
}

View file

@ -305,7 +305,7 @@ void AIRat::Tick(RunListEvent* ev)
}
case 2:
{
if (pActor->float_xvel() != 0 || pActor->float_yvel() != 0 || pActor->float_zvel() != 0) {
if (pActor->vel.X != 0 || pActor->vel.Y != 0 || pActor->vel.Z != 0) {
MoveCreature(pActor);
}
@ -317,7 +317,7 @@ void AIRat::Tick(RunListEvent* ev)
if (pActor->pTarget == nullptr)
{
pActor->nCount = RandomSize(6);
if (pActor->float_xvel() != 0 || pActor->float_yvel() != 0)
if (pActor->vel.X != 0 || pActor->vel.Y != 0)
{
pActor->vel.X = 0;
pActor->vel.Y = 0;

View file

@ -1659,7 +1659,7 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor)
pActor->add_int_yvel((edi * bsin(nAngle)) >> 3);
pActor->add_int_zvel(- edi * 24);
if (pActor->float_zvel() < -14) {
if (pActor->vel.Z < -14) {
pActor->set_int_zvel(-3584);
}
}

View file

@ -267,7 +267,7 @@ void AISet::Tick(RunListEvent* ev)
pushmove(pActor, &sect, pActor->spr.clipdist << 2, 5120, -5120, CLIPMASK0);
pActor->setsector(sect);
if (pActor->float_zvel() > 4000/256.)
if (pActor->vel.Z > 4000/256.)
{
if (nMov.exbits & kHitAux2)
{

View file

@ -281,7 +281,7 @@ void AISpider::Tick(RunListEvent* ev)
return;
if (nMov.exbits & kHitAux1
&& spp->float_zvel() < 0
&& spp->vel.Z < 0
&& hiHit.type != kHitSprite
&& !((spp->sector()->ceilingstat) & CSTAT_SECTOR_SKY))
{

View file

@ -333,7 +333,7 @@ void AIWasp::Tick(RunListEvent* ev)
{
auto pSector =pActor->sector();
pActor->spr.pos.Z = pActor->float_zvel();
pActor->spr.pos.Z = pActor->vel.Z;
if (pActor->spr.pos.Z >= pSector->floorz)
{

View file

@ -761,7 +761,7 @@ int DoCoolgDeath(DSWActor* actor)
DoActorSlide(actor);
// slide while falling
auto vec = actor->spr.angle.ToVector() * actor->float_xvel();
auto vec = actor->spr.angle.ToVector() * actor->vel.X;
actor->user.coll = move_sprite(actor, DVector3(vec, 0), actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
DoFindGroundPoint(actor);

View file

@ -524,7 +524,7 @@ int DoEelDeath(DSWActor* actor)
DoActorSlide(actor);
// slide while falling
auto vec = actor->spr.angle.ToVector() * actor->float_xvel();
auto vec = actor->spr.angle.ToVector() * actor->vel.X;
actor->user.coll = move_sprite(actor, DVector3(vec, 0), actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
DoFindGroundPoint(actor);

View file

@ -504,7 +504,7 @@ int DoHornetDeath(DSWActor* actor)
DoActorSlide(actor);
// slide while falling
auto vec = actor->spr.angle.ToVector() * actor->float_xvel();
auto vec = actor->spr.angle.ToVector() * actor->vel.X;
actor->user.coll = move_sprite(actor, DVector3(vec, 0), actor->user.ceiling_dist, actor->user.floor_dist, 1, ACTORMOVETICS);

View file

@ -265,18 +265,18 @@ int DoWallBloodDrip(DSWActor* actor)
if (actor->spr.pos.Z > actor->user.pos.Y && actor->spr.pos.Z < actor->user.pos.Z)
{
actor->add_int_zvel( 300);
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
}
else
{
actor->set_int_zvel((300+RandomRange(2300)) >> 1);
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
}
}
else
{
actor->set_int_zvel((300+RandomRange(2300)) >> 1);
actor->spr.pos.Z += actor->float_zvel();
actor->spr.pos.Z += actor->vel.Z;
}
if (actor->spr.pos.Z >= actor->user.loz)
@ -1188,7 +1188,7 @@ int SpawnRadiationCloud(DSWActor* actor)
int DoRadiationCloud(DSWActor* actor)
{
actor->spr.pos.XY() += actor->user.change;
actor->spr.pos.Z -= actor->float_zvel();
actor->spr.pos.Z -= actor->vel.Z;
if (actor->user.ID)
{

View file

@ -253,7 +253,7 @@ int SetupSkull(DSWActor* actor)
int DoSkullMove(DSWActor* actor)
{
auto vect = MOVExy(actor->int_xvel(), actor->spr.angle);
double daz = actor->float_zvel();
double daz = actor->vel.Z;
actor->user.coll = move_missile(actor, DVector3(vect, daz), 16, 16, CLIPMASK_MISSILE, ACTORMOVETICS);
@ -341,7 +341,7 @@ int DoSkullBeginDeath(DSWActor* actor)
int DoSkullJump(DSWActor* actor)
{
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
DoSkullMove(actor);
else
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS)));
@ -355,7 +355,7 @@ int DoSkullJump(DSWActor* actor)
DoFall(actor);
// jump/fall type
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
int dist,a,b,c;
@ -710,7 +710,7 @@ int DoBettyBeginDeath(DSWActor* actor)
int DoBettyJump(DSWActor* actor)
{
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
DoBettyMove(actor);
else
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS)));
@ -724,7 +724,7 @@ int DoBettyJump(DSWActor* actor)
DoFall(actor);
// jump/fall type
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
int dist,a,b,c;

View file

@ -4967,7 +4967,7 @@ int DoGet(DSWActor* actor)
return 0;
}
if(actor->float_xvel() != 0)
if(actor->vel.X != 0)
{
if (!DoItemFly(actor))
{

View file

@ -3461,11 +3461,11 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
else
{
// calculate a new x and y
vec.XY() = actor->spr.angle.ToVector() * actor->float_xvel();
vec.XY() = actor->spr.angle.ToVector() * actor->vel.X;
}
if (actor->float_zvel() != 0)
vec.Z = actor->float_zvel() * locktics;
if (actor->vel.Z != 0)
vec.Z = actor->vel.Z * locktics;
}
actor->user.coll = move_sprite(actor, vec, actor->user.ceiling_dist, actor->user.floor_dist, 0, locktics);

View file

@ -7715,7 +7715,7 @@ int ComboMissileSeek(DSWActor* actor, int16_t delay_tics, int16_t aware_range/*,
double zdiff = actor->spr.pos.Z - ActorZOfTop(goal) - (ActorSizeZ(goal) * 0.25);
double dist = g_sqrt((actor->spr.pos.XY() - goal->spr.pos.XY()).LengthSquared() + zdiff * zdiff);
actor->user.change.Z = (actor->float_xvel()) * zdiff / dist + actor->user.change.Z * (15 / 16.);
actor->user.change.Z = (actor->vel.X) * zdiff / dist + actor->user.change.Z * (15 / 16.);
}
return 0;
}
@ -7921,7 +7921,7 @@ int DoPlasma(DSWActor* actor)
DoBlurExtend(actor, 0, 4);
auto vec = MOVExy(actor->int_xvel(), actor->spr.angle);
double daz = actor->float_zvel();
double daz = actor->vel.Z;
actor->user.coll = move_missile(actor, DVector3(vec, daz), 16, 16, CLIPMASK_MISSILE, MISSILEMOVETICS);
@ -8850,7 +8850,7 @@ int DoBoltThinMan(DSWActor* actor)
DoBlurExtend(actor, 0, 4);
auto vec = MOVExy(actor->int_xvel(), actor->spr.angle);
double daz = actor->float_zvel();
double daz = actor->vel.Z;
actor->user.coll = move_missile(actor, DVector3(vec, daz), CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS);
@ -9421,7 +9421,7 @@ int DoBoltSeeker(DSWActor* actor)
DoBlurExtend(actor, 0, 4);
auto vec = MOVExy(actor->int_xvel(), actor->spr.angle);
double daz = actor->float_zvel();
double daz = actor->vel.Z;
actor->user.coll = move_missile(actor, DVector3(vec, daz), CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS);
@ -9460,7 +9460,7 @@ int DoElectro(DSWActor* actor)
MissileSeek(actor, 30, 512/*, 3, 52, 2*/);
auto vec = MOVExy(actor->int_xvel(), actor->spr.angle);
double daz = actor->float_zvel();
double daz = actor->vel.Z;
actor->user.coll = move_missile(actor, DVector3(vec, daz), CEILING_DIST, FLOOR_DIST, CLIPMASK_MISSILE, MISSILEMOVETICS);
@ -11102,7 +11102,7 @@ int DoSerpRing(DSWActor* actor)
return 0;
}
double zz = actor->int_pos().Z + actor->float_zvel();
double zz = actor->int_pos().Z + actor->vel.Z;
if (zz > own->spr.pos.Z - actor->user.pos.Z)
zz = own->spr.pos.Z - actor->user.pos.Z;
@ -16187,7 +16187,7 @@ int InitEnemyFireball(DSWActor* actor)
if (dist != 0)
{
actorNew->set_int_zvel((GORO_FIREBALL_VELOCITY * (targ_z - actorNew->int_pos().Z)) / dist);
actorNew->user.change.Z = actorNew->float_zvel();
actorNew->user.change.Z = actorNew->vel.Z;
}
// back up first one
lastvel = actorNew->int_zvel();
@ -16614,13 +16614,13 @@ DSWActor* SpawnBubble(DSWActor* actor)
int DoVehicleSmoke(DSWActor* actor)
{
actor->spr.pos.XY() += actor->user.change.XY();
actor->spr.pos.Z -= actor->float_zvel();
actor->spr.pos.Z -= actor->vel.Z;
return false;
}
int DoWaterSmoke(DSWActor* actor)
{
actor->spr.pos.Z -= actor->float_zvel();
actor->spr.pos.Z -= actor->vel.Z;
return false;
}
@ -16678,10 +16678,10 @@ int SpawnSmokePuff(DSWActor* actor)
int DoBubble(DSWActor* actor)
{
actor->spr.pos.Z -= actor->float_zvel();
actor->spr.pos.Z -= actor->vel.Z;
actor->add_int_zvel( 32);
if (actor->float_zvel() > 3)
if (actor->vel.Z > 3)
actor->set_int_zvel(768);
// notreallypos