mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
-add_int_xvel(-
This commit is contained in:
parent
d19e99481d
commit
643dda6085
7 changed files with 20 additions and 20 deletions
|
@ -1029,7 +1029,7 @@ void movewaterdrip(DDukeActor *actor, int drip)
|
|||
{
|
||||
makeitfall(actor);
|
||||
ssp(actor, CLIPMASK0);
|
||||
if(actor->float_xvel() > 0) actor->spr.xvel -= 2;
|
||||
if(actor->float_xvel() > 0) actor->add_int_xvel(-2);
|
||||
|
||||
if (actor->float_zvel() == 0)
|
||||
{
|
||||
|
@ -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->spr.xvel -= 16;
|
||||
if(actor->float_xvel() > 0) actor->add_int_xvel(-16);
|
||||
else actor->clear_xvel();
|
||||
|
||||
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->spr.xvel -= 16;
|
||||
if(actor->float_xvel() > 0) actor->add_int_xvel(-16);
|
||||
else actor->clear_xvel();
|
||||
}
|
||||
}
|
||||
|
@ -2384,7 +2384,7 @@ void shell(DDukeActor* actor, bool morecheck)
|
|||
if (actor->float_zvel() < 0.5) actor->add_int_zvel( (gs.gravity / 13)); // 8
|
||||
else actor->add_int_zvel(- 64);
|
||||
if(actor->float_xvel() > 0)
|
||||
actor->spr.xvel -= 4;
|
||||
actor->add_int_xvel(-4);
|
||||
else actor->clear_xvel();
|
||||
}
|
||||
else
|
||||
|
@ -2444,7 +2444,7 @@ void glasspieces(DDukeActor* actor)
|
|||
|
||||
if(actor->float_xvel() > 0)
|
||||
{
|
||||
actor->spr.xvel -= 2;
|
||||
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];
|
||||
}
|
||||
|
@ -2968,7 +2968,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
actor->clear_xvel();
|
||||
|
||||
if(actor->float_xvel() > 0)
|
||||
actor->spr.xvel -= 16;
|
||||
actor->add_int_xvel(-16);
|
||||
else
|
||||
{
|
||||
actor->clear_xvel();
|
||||
|
|
|
@ -757,7 +757,7 @@ void movefallers_d(void)
|
|||
{
|
||||
if (act->int_xvel() > 0)
|
||||
{
|
||||
act->spr.xvel -= 8;
|
||||
act->add_int_xvel(-8);
|
||||
ssp(act, CLIPMASK0);
|
||||
}
|
||||
|
||||
|
@ -2369,7 +2369,7 @@ static void greenslime(DDukeActor *actor)
|
|||
|
||||
if (actor->int_xvel() > 96)
|
||||
{
|
||||
actor->spr.xvel -= 2;
|
||||
actor->add_int_xvel(-2);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -2628,9 +2628,9 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
|
||||
if(actor->float_xvel() > 0)
|
||||
{
|
||||
actor->spr.xvel -= 5;
|
||||
actor->add_int_xvel(-5);
|
||||
if (sectp->lotag == 2)
|
||||
actor->spr.xvel -= 10;
|
||||
actor->add_int_xvel(-10);
|
||||
|
||||
if(actor->float_xvel() < 0)
|
||||
actor->clear_xvel();
|
||||
|
@ -3164,7 +3164,7 @@ void handle_se06_d(DDukeActor* actor)
|
|||
{
|
||||
actor->temp_data[4]--;
|
||||
if (actor->temp_data[4] >= (k - (k >> 3)))
|
||||
actor->spr.xvel -= (k >> 5);
|
||||
actor->add_int_xvel(-(k >> 5));
|
||||
if (actor->temp_data[4] > ((k >> 1) - 1) && actor->temp_data[4] < (k - (k >> 3)))
|
||||
actor->clear_xvel();
|
||||
if (actor->temp_data[4] < (k >> 1))
|
||||
|
|
|
@ -674,7 +674,7 @@ void movefallers_r(void)
|
|||
{
|
||||
if (act->int_xvel() > 0)
|
||||
{
|
||||
act->spr.xvel -= 2;
|
||||
act->add_int_xvel(-2);
|
||||
ssp(act, CLIPMASK0);
|
||||
}
|
||||
|
||||
|
@ -2416,9 +2416,9 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
|
||||
if(actor->float_xvel() > 0)
|
||||
{
|
||||
actor->spr.xvel -= 5;
|
||||
actor->add_int_xvel(-5);
|
||||
if (sectp->lotag == 2)
|
||||
actor->spr.xvel -= 10;
|
||||
actor->add_int_xvel(-10);
|
||||
|
||||
if(actor->float_xvel() < 0)
|
||||
actor->clear_xvel();
|
||||
|
@ -3151,7 +3151,7 @@ void handle_se06_r(DDukeActor *actor)
|
|||
{
|
||||
actor->temp_data[4]--;
|
||||
if (actor->temp_data[4] >= (k - (k >> 3)))
|
||||
actor->spr.xvel -= (k >> 5);
|
||||
actor->add_int_xvel(-(k >> 5));
|
||||
if (actor->temp_data[4] > ((k >> 1) - 1) && actor->temp_data[4] < (k - (k >> 3)))
|
||||
actor->clear_xvel();
|
||||
if (actor->temp_data[4] < (k >> 1))
|
||||
|
|
|
@ -226,7 +226,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (pActor->int_xvel() > 0)
|
||||
{
|
||||
pActor->spr.xvel -= 1024;
|
||||
pActor->add_int_xvel(-1024);
|
||||
if (pActor->int_xvel() < 0) {
|
||||
pActor->clear_xvel();
|
||||
}
|
||||
|
|
|
@ -1896,7 +1896,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
|
||||
if (nMov.exbits & kHitAux2)
|
||||
{
|
||||
pActor->spr.xvel -= pActor->int_xvel() >> 3;
|
||||
pActor->add_int_xvel(-pActor->int_xvel() >> 3);
|
||||
pActor->spr.yvel -= pActor->spr.yvel >> 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -1227,7 +1227,7 @@ int PlayerInitChemBomb(PLAYER* pp)
|
|||
// don't throw it as far if crawling
|
||||
if (pp->Flags & (PF_CRAWLING))
|
||||
{
|
||||
actorNew->spr.xvel -= (actorNew->int_xvel() >> 2);
|
||||
actorNew->add_int_xvel(-(actorNew->int_xvel() >> 2));
|
||||
}
|
||||
|
||||
// actorNew->user.RotNum = 5;
|
||||
|
@ -1578,7 +1578,7 @@ int PlayerInitCaltrops(PLAYER* pp)
|
|||
// don't throw it as far if crawling
|
||||
if (pp->Flags & (PF_CRAWLING))
|
||||
{
|
||||
actorNew->spr.xvel -= (actorNew->int_xvel() >> 2);
|
||||
actorNew->add_int_xvel(-(actorNew->int_xvel() >> 2));
|
||||
}
|
||||
|
||||
actorNew->user.Flags |= (SPR_XFLIP_TOGGLE);
|
||||
|
|
|
@ -15865,7 +15865,7 @@ int InitGrenade(PLAYER* pp)
|
|||
// don't throw it as far if crawling
|
||||
if (pp->Flags & (PF_CRAWLING))
|
||||
{
|
||||
actorNew->spr.xvel -= (actorNew->int_xvel() >> 2);
|
||||
actorNew->add_int_xvel(-(actorNew->int_xvel() >> 2));
|
||||
}
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
|
|
Loading…
Reference in a new issue