mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- more xvel wraps.
This commit is contained in:
parent
cf90970121
commit
434548a5aa
7 changed files with 32 additions and 32 deletions
|
@ -4121,7 +4121,7 @@ void handle_se20(DDukeActor* actor)
|
|||
int x = MulScale(actor->int_xvel(), bcos(actor->int_ang()), 14);
|
||||
int l = MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->temp_data[3] += actor->spr.xvel;
|
||||
actor->temp_data[3] += actor->int_xvel();
|
||||
|
||||
actor->add_int_pos({ x, l, 0 });
|
||||
|
||||
|
|
|
@ -1313,7 +1313,7 @@ static bool movefireball(DDukeActor* actor)
|
|||
{
|
||||
actor->temp_actor = ball;
|
||||
|
||||
ball->spr.xvel = actor->spr.xvel;
|
||||
ball->spr.xvel = actor->int_xvel();
|
||||
ball->spr.yvel = actor->spr.yvel;
|
||||
ball->set_int_zvel(actor->int_zvel());
|
||||
if (actor->temp_data[0] > 1)
|
||||
|
@ -1332,7 +1332,7 @@ static bool movefireball(DDukeActor* actor)
|
|||
ball->spr.extra = 0;
|
||||
|
||||
ball->temp_pos = ball->spr.pos;
|
||||
ball->fproj.vel = { ball->spr.xvel, ball->spr.yvel, ball->int_zvel()};
|
||||
ball->fproj.vel = { ball->int_xvel(), ball->spr.yvel, ball->int_zvel()};
|
||||
|
||||
ChangeActorStat(ball, STAT_PROJECTILE);
|
||||
}
|
||||
|
@ -1516,7 +1516,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
}
|
||||
else
|
||||
{
|
||||
k = proj->spr.xvel;
|
||||
k = proj->int_xvel();
|
||||
ll = proj->int_zvel();
|
||||
}
|
||||
|
||||
|
@ -1706,7 +1706,7 @@ void moveweapons_d(void)
|
|||
continue;
|
||||
|
||||
case FREEZEBLAST:
|
||||
if (act->spr.yvel < 1 || act->spr.extra < 2 || (act->spr.xvel|act->int_zvel()) == 0)
|
||||
if (act->spr.yvel < 1 || act->spr.extra < 2 || (act->float_xvel() == 0 && act->float_zvel() == 0))
|
||||
{
|
||||
auto spawned = spawn(act,TRANSPORTERSTAR);
|
||||
if (spawned)
|
||||
|
@ -2457,7 +2457,7 @@ static void flamethrowerflame(DDukeActor *actor)
|
|||
}
|
||||
|
||||
auto dapos = actor->spr.pos;
|
||||
int xvel = actor->spr.xvel;
|
||||
int xvel = actor->int_xvel();
|
||||
|
||||
getglobalz(actor);
|
||||
|
||||
|
@ -3182,7 +3182,7 @@ void handle_se06_d(DDukeActor* actor)
|
|||
{
|
||||
if ((act2->spr.lotag == 14) && (sh == act2->spr.hitag) && (act2->temp_data[0] == actor->temp_data[0]))
|
||||
{
|
||||
act2->spr.xvel = actor->spr.xvel;
|
||||
act2->spr.xvel = actor->int_xvel();
|
||||
//if( actor->temp_data[4] == 1 )
|
||||
{
|
||||
if (act2->temp_data[5] == 0)
|
||||
|
@ -3629,7 +3629,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
if ((actor->spr.pos.Z - actor->ceilingz) < 32)
|
||||
actor->spr.pos.Z = actor->ceilingz + 32;
|
||||
|
||||
daxvel = actor->spr.xvel;
|
||||
daxvel = actor->int_xvel();
|
||||
angdif = actor->int_ang();
|
||||
|
||||
if (a && actor->spr.picnum != ROTATEGUN)
|
||||
|
|
|
@ -1187,7 +1187,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
}
|
||||
else
|
||||
{
|
||||
k = proj->spr.xvel;
|
||||
k = proj->int_xvel();
|
||||
ll = proj->int_zvel();
|
||||
}
|
||||
|
||||
|
@ -1724,8 +1724,8 @@ void movetransports_r(void)
|
|||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
|
||||
movesprite_ex(act2, MulScale(act2->spr.xvel, bcos(act2->int_ang()), 14),
|
||||
MulScale(act2->spr.xvel, bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
|
||||
movesprite_ex(act2, MulScale(act2->int_xvel(), bcos(act2->int_ang()), 14),
|
||||
MulScale(act2->int_xvel(), bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
|
||||
|
||||
break;
|
||||
case 161:
|
||||
|
@ -1736,8 +1736,8 @@ void movetransports_r(void)
|
|||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
|
||||
movesprite_ex(act2, MulScale(act2->spr.xvel, bcos(act2->int_ang()), 14),
|
||||
MulScale(act2->spr.xvel, bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
|
||||
movesprite_ex(act2, MulScale(act2->int_xvel(), bcos(act2->int_ang()), 14),
|
||||
MulScale(act2->int_xvel(), bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -2679,8 +2679,8 @@ void moveactors_r(void)
|
|||
if (sectp->lotag == 903)
|
||||
makeitfall(act);
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
|
||||
act->int_zvel(),CLIPMASK0, coll);
|
||||
switch (sectp->lotag)
|
||||
{
|
||||
|
@ -2720,8 +2720,8 @@ void moveactors_r(void)
|
|||
}
|
||||
makeitfall(act);
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
|
||||
act->int_zvel(),CLIPMASK0, coll);
|
||||
if (coll.type > kHitSector)
|
||||
{
|
||||
|
@ -2751,8 +2751,8 @@ void moveactors_r(void)
|
|||
}
|
||||
makeitfall(act);
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
|
||||
act->int_zvel(),CLIPMASK0, coll);
|
||||
if (act->spr.pos.Z >= sectp->floorz - 8)
|
||||
{
|
||||
|
@ -2850,8 +2850,8 @@ void moveactors_r(void)
|
|||
if (act->spr.xvel)
|
||||
{
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
|
||||
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
|
||||
act->int_zvel(),CLIPMASK0, coll);
|
||||
act->spr.xvel--;
|
||||
}
|
||||
|
@ -3234,7 +3234,7 @@ void handle_se06_r(DDukeActor *actor)
|
|||
{
|
||||
if ((act2->spr.lotag == 14) && (sh == act2->spr.hitag) && (act2->temp_data[0] == actor->temp_data[0]))
|
||||
{
|
||||
act2->spr.xvel = actor->spr.xvel;
|
||||
act2->spr.xvel = actor->int_xvel();
|
||||
// if( actor->temp_data[4] == 1 )
|
||||
{
|
||||
if (act2->temp_data[5] == 0)
|
||||
|
@ -3674,7 +3674,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if ((actor->spr.pos.Z - actor->ceilingz) < 32)
|
||||
actor->spr.pos.Z = actor->ceilingz + 32;
|
||||
|
||||
daxvel = actor->spr.xvel;
|
||||
daxvel = actor->int_xvel();
|
||||
angdif = actor->int_ang();
|
||||
|
||||
if (a)
|
||||
|
|
|
@ -1238,7 +1238,7 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
case ACTOR_XVEL:
|
||||
if (bSet) act->spr.xvel = lValue;
|
||||
else SetGameVarID(lVar2, act->spr.xvel, sActor, sPlayer);
|
||||
else SetGameVarID(lVar2, act->int_xvel(), sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_YVEL:
|
||||
if (bSet) act->spr.yvel = lValue;
|
||||
|
@ -2383,7 +2383,7 @@ int ParseState::parse(void)
|
|||
l = *insptr;
|
||||
j = 0;
|
||||
|
||||
s = g_ac->spr.xvel;
|
||||
s = g_ac->int_xvel();
|
||||
|
||||
// sigh.. this was yet another place where number literals were used as bit masks for every single value, making the code totally unreadable.
|
||||
if( (l& pducking) && ps[g_p].on_ground && PlayerInput(g_p, SB_CROUCH))
|
||||
|
|
|
@ -3546,7 +3546,7 @@ void processinput_r(int snum)
|
|||
if (p->GetActor()->spr.xrepeat < 8 && p->jetpack_on == 0)
|
||||
{
|
||||
p->ofistsign = p->fistsign;
|
||||
p->fistsign += p->GetActor()->spr.xvel;
|
||||
p->fistsign += p->GetActor()->int_xvel();
|
||||
}
|
||||
|
||||
if (p->transporter_hold > 0)
|
||||
|
|
|
@ -235,7 +235,7 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo
|
|||
}
|
||||
else
|
||||
{
|
||||
int xVel = pHitActor->spr.xvel;
|
||||
int xVel = pHitActor->int_xvel();
|
||||
int yVel = pHitActor->spr.yvel;
|
||||
|
||||
pHitActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
|
|
|
@ -4135,7 +4135,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, DAngle hit_angle, const DVe
|
|||
// special case
|
||||
// blood coming off of actors should have the acceleration of the actor
|
||||
// so add it in
|
||||
actorNew->spr.xvel += actor->spr.xvel;
|
||||
actorNew->spr.xvel += actor->int_xvel();
|
||||
|
||||
actorNew->user.ceiling_dist = actorNew->user.floor_dist = 2;
|
||||
actorNew->user.jump_speed = p->min_jspeed;
|
||||
|
@ -10881,7 +10881,7 @@ bool MissileSetPos(DSWActor* actor, ANIMATOR* DoWeapon, int dist)
|
|||
|
||||
// backup values
|
||||
auto oldc = actor->user.change;
|
||||
oldvel = actor->spr.xvel;
|
||||
oldvel = actor->int_xvel();
|
||||
oldzvel = actor->int_zvel();
|
||||
|
||||
// make missile move in smaller increments
|
||||
|
@ -10914,7 +10914,7 @@ bool TestMissileSetPos(DSWActor* actor, ANIMATOR* DoWeapon, int dist, int zvel)
|
|||
|
||||
// backup values
|
||||
auto oldc = actor->user.change;
|
||||
oldvel = actor->spr.xvel;
|
||||
oldvel = actor->int_xvel();
|
||||
oldzvel = actor->int_zvel();
|
||||
|
||||
// make missile move in smaller increments
|
||||
|
@ -12190,7 +12190,7 @@ int WeaponAutoAimZvel(DSWActor* actor, DSWActor* missileActor, int *zvel, short
|
|||
#if 0
|
||||
//formula for leading a player
|
||||
dist = Distance(actor->int_pos().X, actor->int_pos().Y, hp->pos.X, hp->pos.Y);
|
||||
time_to_target = dist/missileActor->spr.xvel;
|
||||
time_to_target = dist/missileActor->int_xvel();
|
||||
lead_dist = time_to_target*hp->vel;
|
||||
#endif
|
||||
|
||||
|
@ -16076,7 +16076,7 @@ int InitEnemyMine(DSWActor* actor)
|
|||
|
||||
int HelpMissileLateral(DSWActor* actor, int dist)
|
||||
{
|
||||
auto old_xvel = actor->spr.xvel;
|
||||
auto old_xvel = actor->int_xvel();
|
||||
auto old_clipdist = actor->spr.clipdist;
|
||||
|
||||
actor->spr.xvel = dist;
|
||||
|
|
Loading…
Reference in a new issue