mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 16:10:52 +00:00
- handle some simple vector additions with velocity.
This commit is contained in:
parent
c821683bc5
commit
bca4819841
3 changed files with 9 additions and 16 deletions
|
@ -2947,7 +2947,7 @@ void processinput_d(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (p->__vel.X || p->__vel.Y || sb_fvel || sb_svel)
|
||||
if (p->vel.X || p->vel.Y || sb_fvel || sb_svel)
|
||||
{
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
|
|
|
@ -2799,8 +2799,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
p->visibility = 0;
|
||||
if (psectlotag != 857)
|
||||
{
|
||||
p->__vel.X -= p->angle.ang.Cos() * (1 << 18);
|
||||
p->__vel.Y -= p->angle.ang.Sin() * (1 << 18);
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * VEL_FACTOR;
|
||||
}
|
||||
}
|
||||
else if (p->kickback_pic == 2)
|
||||
|
@ -2899,14 +2898,12 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
|
||||
if (psectlotag != 857)
|
||||
{
|
||||
p->__vel.X -= p->angle.ang.Cos() * (1 << 19);
|
||||
p->__vel.Y -= p->angle.ang.Sin() * (1 << 19);
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * VEL_FACTOR * 2;
|
||||
}
|
||||
}
|
||||
else if (psectlotag != 857)
|
||||
{
|
||||
p->__vel.X -= p->angle.ang.Cos() * (1 << 18);
|
||||
p->__vel.Y -= p->angle.ang.Sin() * (1 << 18);
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * VEL_FACTOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2992,8 +2989,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
|
||||
if (psectlotag != 857)
|
||||
{
|
||||
p->__vel.X -= p->angle.ang.Cos() * (1 << 18);
|
||||
p->__vel.Y -= p->angle.ang.Sin() * (1 << 18);
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * VEL_FACTOR;
|
||||
}
|
||||
checkavailweapon(p);
|
||||
|
||||
|
@ -3133,8 +3129,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
}
|
||||
else if (p->kickback_pic == 12)
|
||||
{
|
||||
p->__vel.X -= p->angle.ang.Cos() * (1 << 18);
|
||||
p->__vel.Y -= p->angle.ang.Sin() * (1 << 18);
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * VEL_FACTOR;
|
||||
p->horizon.addadjustment(buildhoriz(20));
|
||||
p->recoil += 20;
|
||||
}
|
||||
|
@ -3183,8 +3178,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
}
|
||||
if (p->kickback_pic < 30)
|
||||
{
|
||||
p->__vel.X -= p->angle.ang.Cos() * (1 << 18);
|
||||
p->__vel.Y -= p->angle.ang.Sin() * (1 << 18);
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * VEL_FACTOR;
|
||||
}
|
||||
p->kickback_pic++;
|
||||
if (p->kickback_pic > 40)
|
||||
|
@ -3770,7 +3764,7 @@ void processinput_r(int snum)
|
|||
|
||||
if (shrunk)
|
||||
{
|
||||
p->__vel.XY() *= gs.playerfriction * 0.75;
|
||||
p->vel.XY() *= gs.playerfriction * 0.75;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -916,8 +916,7 @@ void checkplayerhurt_d(player_struct* p, const Collision& coll)
|
|||
p->hurt_delay = 16;
|
||||
SetPlayerPal(p, PalEntry(32, 32, 0, 0));
|
||||
|
||||
p->__vel.X = -p->angle.ang.Cos() * (1 << 22);
|
||||
p->__vel.Y = -p->angle.ang.Sin() * (1 << 22);
|
||||
p->vel.XY() = -p->angle.ang.ToVector() * 16 * VEL_FACTOR;
|
||||
S_PlayActorSound(DUKE_LONGTERM_PAIN, p->GetActor());
|
||||
|
||||
fi.checkhitwall(p->GetActor(), wal, p->pos + p->angle.ang.ToVector() * 2, -1);
|
||||
|
|
Loading…
Reference in a new issue