mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- SW: Fix issues with sector object machine guns in InitSobjMachineGun()
following changes in 6476430be6
.
* Needed to account for rebase of horizon re-centering from 100 to 0. * Horizon value here is only for projectile's z and not the player's z. * Fixes https://forum.zdoom.org/viewtopic.php?f=340&t=70199&p=1168858.
This commit is contained in:
parent
b4a011300a
commit
1109a90273
1 changed files with 5 additions and 4 deletions
|
@ -18561,11 +18561,12 @@ InitSobjMachineGun(short SpriteNum, PLAYERp pp)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto horizmin = 75;
|
||||
if (pp->horizon.horiz.asbuild() < horizmin)
|
||||
pp->horizon.settarget(horizmin);
|
||||
fixed_t q16horiz = pp->horizon.horiz.asq16();
|
||||
fixed_t horizmin = IntToFixed(-25);
|
||||
if (q16horiz < horizmin)
|
||||
q16horiz = horizmin;
|
||||
|
||||
daz = -mulscale16(pp->horizon.horiz.asq16(), 2000) + (RANDOM_RANGE(Z(80)) - Z(40));
|
||||
daz = -mulscale16(q16horiz, 2000) + (RANDOM_RANGE(Z(80)) - Z(40));
|
||||
daang = sp->ang;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue