mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- almost the rest.
This commit is contained in:
parent
ce20bd9c56
commit
567b20f9ef
12 changed files with 30 additions and 30 deletions
|
@ -2446,7 +2446,7 @@ void glasspieces(DDukeActor* actor)
|
|||
{
|
||||
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[actor->spr.xvel & 3];
|
||||
actor->spr.cstat = flips[int(actor->float_xvel() * 16) & 3];
|
||||
}
|
||||
else actor->clear_xvel();
|
||||
|
||||
|
@ -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->spr.xvel && actor->spr.picnum != TILE_DRONE)
|
||||
if (actor->float_xvel() != 0 && actor->spr.picnum != TILE_DRONE)
|
||||
{
|
||||
angdif = getincangle(aang, goalang);
|
||||
|
||||
|
|
|
@ -3564,7 +3564,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
|
||||
a = badguy(actor);
|
||||
|
||||
if (actor->spr.xvel || actor->int_zvel())
|
||||
if (actor->float_xvel() != 0 || actor->int_zvel())
|
||||
{
|
||||
if (a && actor->spr.picnum != ROTATEGUN)
|
||||
{
|
||||
|
|
|
@ -1349,7 +1349,7 @@ void moveweapons_r(void)
|
|||
continue;
|
||||
|
||||
case FREEZEBLAST:
|
||||
if (proj->spr.yvel < 1 || proj->spr.extra < 2 || (proj->spr.xvel | proj->int_zvel()) == 0)
|
||||
if (proj->spr.yvel < 1 || proj->spr.extra < 2 || (proj->int_xvel() == 0 && proj->int_zvel() == 0))
|
||||
{
|
||||
auto star = spawn(proj, TRANSPORTERSTAR);
|
||||
if (star)
|
||||
|
@ -2441,7 +2441,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
goto DETONATEB;
|
||||
}
|
||||
actor->set_int_ang(((k << 1) - actor->int_ang()) & 2047);
|
||||
actor->spr.xvel >>= 1;
|
||||
actor->mul_int_xvel(0.5);
|
||||
}
|
||||
|
||||
DETONATEB:
|
||||
|
@ -3633,7 +3633,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
|
||||
a = badguy(actor);
|
||||
|
||||
if (actor->spr.xvel || actor->float_zvel() != 0)
|
||||
if (actor->float_xvel() != 0 || actor->float_zvel() != 0)
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
|
|
|
@ -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()->spr.xvel != 0)
|
||||
if (ps[p].GetActor()->float_xvel() != 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);
|
||||
|
@ -2227,7 +2227,7 @@ static void operateweapon(int snum, ESyncBits actions)
|
|||
{
|
||||
spawned->add_int_ang(1024);
|
||||
spawned->mul_int_zvel(1./3.);
|
||||
spawned->spr.xvel /= 3;
|
||||
spawned->mul_int_xvel(1./3.);
|
||||
}
|
||||
|
||||
p->hbomb_on = 1;
|
||||
|
@ -3057,7 +3057,7 @@ HORIZONLY:
|
|||
p->pyoff = DAngle::fromBuild(p->pycount).Sin() * pact->int_xvel();
|
||||
|
||||
const double factor = 64. / 1596; // What is 1596?
|
||||
p->pyoff = abs(pact->spr.xvel * DAngle::fromBuild(p->pycount).Sin()) * factor;
|
||||
p->pyoff = abs(pact->int_xvel() * DAngle::fromBuild(p->pycount).Sin()) * factor;
|
||||
}
|
||||
}
|
||||
else if (psectlotag != 2 && psectlotag != 1)
|
||||
|
@ -3073,7 +3073,7 @@ HORIZONLY:
|
|||
if (ud.clipping == 0 && psectp->lotag == 31)
|
||||
{
|
||||
auto secact = barrier_cast<DDukeActor*>(psectp->hitagactor);
|
||||
if (secact && secact->spr.xvel && secact->temp_data[0] == 0)
|
||||
if (secact && secact->float_xvel() != 0 && secact->temp_data[0] == 0)
|
||||
{
|
||||
quickkill(p);
|
||||
return;
|
||||
|
|
|
@ -2764,7 +2764,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
{
|
||||
spawned->add_int_ang(1024);
|
||||
spawned->mul_int_zvel(1./3.);
|
||||
spawned->spr.xvel /= 3;
|
||||
spawned->mul_int_xvel(1./3.);
|
||||
}
|
||||
|
||||
p->hbomb_on = 1;
|
||||
|
@ -3890,7 +3890,7 @@ HORIZONLY:
|
|||
p->pycount += 52;
|
||||
p->pycount &= 2047;
|
||||
const double factor = 64. / 1596; // What is 1596?
|
||||
p->pyoff = abs(pact->spr.xvel * DAngle::fromBuild(p->pycount).Sin()) * factor;
|
||||
p->pyoff = abs(pact->int_xvel() * DAngle::fromBuild(p->pycount).Sin()) * factor;
|
||||
}
|
||||
}
|
||||
else if (psectlotag != ST_2_UNDERWATER && psectlotag != 1 && (!isRRRA() || !p->sea_sick_stat))
|
||||
|
@ -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->spr.xvel && act->temp_data[0] == 0)
|
||||
if (act && act->float_xvel() != 0 && act->temp_data[0] == 0)
|
||||
{
|
||||
quickkill(p);
|
||||
return;
|
||||
|
|
|
@ -368,7 +368,7 @@ void operateweapon_ww(int snum, ESyncBits actions)
|
|||
{
|
||||
j->add_int_ang(1024);
|
||||
j->mul_int_zvel(1./3.);
|
||||
j->spr.xvel /= 3;
|
||||
j->mul_int_xvel(1./3.);
|
||||
}
|
||||
|
||||
p->hbomb_on = 1;
|
||||
|
|
|
@ -713,7 +713,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
|
||||
if (pTarget->spr.statnum != 100)
|
||||
{
|
||||
x += (pTarget->spr.xvel * 20) >> 6;
|
||||
x += (pTarget->int_xvel() * 20) >> 6;
|
||||
y += (pTarget->spr.yvel * 20) >> 6;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -222,7 +222,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
}
|
||||
|
||||
if (pActor->spr.xvel || pActor->spr.yvel)
|
||||
if (pActor->float_xvel() != 0 || pActor->spr.yvel)
|
||||
{
|
||||
if (pActor->int_xvel() > 0)
|
||||
{
|
||||
|
|
|
@ -305,7 +305,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
}
|
||||
case 2:
|
||||
{
|
||||
if (pActor->spr.xvel || pActor->spr.yvel || pActor->float_zvel() != 0) {
|
||||
if (pActor->float_xvel() != 0 || pActor->spr.yvel || pActor->float_zvel() != 0) {
|
||||
MoveCreature(pActor);
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
if (pActor->pTarget == nullptr)
|
||||
{
|
||||
pActor->nCount = RandomSize(6);
|
||||
if (pActor->spr.xvel || pActor->spr.yvel)
|
||||
if (pActor->float_xvel() != 0 || pActor->spr.yvel)
|
||||
{
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
|
|
|
@ -415,7 +415,7 @@ int InitHornetCircle(DSWActor* actor)
|
|||
// set to really fast
|
||||
actor->set_int_xvel(400);
|
||||
// angle adjuster
|
||||
actor->user.Counter2 = actor->spr.xvel/3;
|
||||
actor->user.Counter2 = actor->int_xvel() / 3;
|
||||
// random angle direction
|
||||
if (RANDOM_P2(1024) < 512)
|
||||
actor->user.Counter2 = -actor->user.Counter2;
|
||||
|
|
|
@ -5766,7 +5766,7 @@ void DoPlayerDeathCheckKick(PLAYER* pp)
|
|||
plActor->user.slide_ang = getangle(plActor->int_pos().X - itActor->int_pos().X, plActor->int_pos().Y - itActor->int_pos().Y);
|
||||
plActor->user.slide_ang = NORM_ANGLE(plActor->user.slide_ang + (RANDOM_P2(128<<5)>>5) - 64);
|
||||
|
||||
plActor->user.slide_vel = itActor->spr.xvel<<1;
|
||||
plActor->user.slide_vel = itActor->int_xvel() << 1;
|
||||
plActor->user.Flags &= ~(SPR_BOUNCE);
|
||||
pp->jump_speed = -500;
|
||||
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
||||
|
|
|
@ -11199,7 +11199,7 @@ void SetZVelFromTarget(DSWActor* actorNew, DSWActor* actor, bool setchange = fal
|
|||
if (dist != 0)
|
||||
{
|
||||
double zdist = (ActorUpperZ(actor->user.targetActor) - actorNew->spr.pos.Z - offset) / dist;
|
||||
double change = zdist * actorNew->spr.xvel * inttoworld;
|
||||
double change = zdist * actorNew->int_xvel() * inttoworld;
|
||||
actorNew->set_int_zvel((change * zworldtoint));
|
||||
if (setchange) actorNew->user.change.Z = change;
|
||||
}
|
||||
|
@ -12175,7 +12175,7 @@ int WeaponAutoAim(DSWActor* actor, DSWActor* mislActor, short ang, bool test)
|
|||
else
|
||||
zh = tos + (siz * 0.25);
|
||||
|
||||
mislActor->set_int_zvel(int((mislActor->spr.xvel * (zh - mislActor->spr.pos.Z)) / dist) * (zworldtoint / worldtoint));
|
||||
mislActor->set_int_zvel(int((mislActor->int_xvel() * (zh - mislActor->spr.pos.Z)) / dist) * (zworldtoint / worldtoint));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -12229,7 +12229,7 @@ int WeaponAutoAimZvel(DSWActor* actor, DSWActor* missileActor, int *zvel, short
|
|||
else
|
||||
zh = tos + (siz * 0.25);
|
||||
|
||||
*zvel = int((missileActor->spr.xvel * (zh - missileActor->spr.pos.Z)) / dist * (zworldtoint));
|
||||
*zvel = int((missileActor->int_xvel() * (zh - missileActor->spr.pos.Z)) / dist * (zworldtoint));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -13475,7 +13475,7 @@ int InitMicro(PLAYER* pp)
|
|||
if (dist != 0)
|
||||
{
|
||||
double zh = ActorZOfTop(picked) + (ActorSizeZ(picked) * 0.25);
|
||||
actorNew->set_int_zvel((actorNew->spr.xvel * (zh - actorNew->spr.pos.Z) * zworldtoint) / dist);
|
||||
actorNew->set_int_zvel((actorNew->int_xvel() * (zh - actorNew->spr.pos.Z) * zworldtoint) / dist);
|
||||
}
|
||||
|
||||
actorNew->user.WpnGoalActor = ts->actor;
|
||||
|
@ -14493,7 +14493,7 @@ int InitTracerUzi(PLAYER* pp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->spr.xvel * (1. / 8.)));
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->int_xvel() * (1. / 8.)));
|
||||
|
||||
plActor->spr.clipdist = oclipdist;
|
||||
|
||||
|
@ -14534,7 +14534,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixed_t q16horiz)
|
|||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
|
||||
|
||||
actorNew->set_int_zvel(int(-MulScaleF(q16horiz, actorNew->spr.xvel * (1. / 8.), 16)));
|
||||
actorNew->set_int_zvel(int(-MulScaleF(q16horiz, actorNew->int_xvel() * (1. / 8.), 16)));
|
||||
|
||||
WeaponAutoAim(actor, actorNew, 32, false);
|
||||
|
||||
|
@ -14919,7 +14919,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
|
|||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
|
||||
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->spr.xvel * (1. / 8.)));
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->int_xvel() * (1. / 8.)));
|
||||
|
||||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
|
@ -15012,7 +15012,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
|
|||
if (dist != 0)
|
||||
{
|
||||
double zh = ActorZOfTop(picked) + (ActorSizeZ(picked) * 0.25);
|
||||
actorNew->set_int_zvel((actorNew->spr.xvel * (zh - actorNew->spr.pos.Z) * zworldtoint) / dist);
|
||||
actorNew->set_int_zvel((actorNew->int_xvel() * (zh - actorNew->spr.pos.Z) * zworldtoint) / dist);
|
||||
}
|
||||
|
||||
actorNew->user.WpnGoalActor = ts->actor;
|
||||
|
@ -15051,7 +15051,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
|
|||
actorNew->user.Flags2 |= (SPR2_SO_MISSILE);
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->spr.xvel * (1. / 8.)));
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->int_xvel() * (1. / 8.)));
|
||||
|
||||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
|
@ -15085,7 +15085,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
|
|||
actorNew->user.Flags2 |= (SPR2_SO_MISSILE);
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->spr.xvel * (1. / 8.)));
|
||||
actorNew->set_int_zvel(int(-pp->horizon.horiz.asbuildf() * actorNew->int_xvel() * (1. / 8.)));
|
||||
|
||||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
|
|
Loading…
Reference in a new issue