- Exhumed: fixed vertical aiming for hitscan weapons.

This code originally did some inept parameter merging which got broken in an earlier refactoring.
This commit is contained in:
Christoph Oelckers 2022-08-20 17:44:55 +02:00
parent 1482052c8a
commit de81bb18c8
3 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,7 @@ int GrabBullet();
void DestroyBullet(int nRun);
int MoveBullet(int nBullet);
void SetBulletEnemy(int nBullet, DExhumedActor* nEnemy);
DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int val1, int nAngle, DExhumedActor* pTarget, int val3);
DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int val1, int nAngle, DExhumedActor* pTarget, int val3, int horiz = 0);
void IgniteSprite(DExhumedActor* nSprite);
void FuncBullet(int, int, int, int);

View file

@ -548,11 +548,10 @@ void SetBulletEnemy(int nBullet, DExhumedActor* pEnemy)
}
}
DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int nAngle, DExhumedActor* pTarget, int nDoubleDamage)
DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int nAngle, DExhumedActor* pTarget, int nDoubleDamage, int nPitch)
{
Bullet sBullet;
bulletInfo *pBulletInfo = &BulletInfo[nType];
int nPitch = 0;
if (pBulletInfo->field_4 > 30000)
{

View file

@ -813,10 +813,11 @@ loc_flag:
if (anglediff < 512 || anglediff > 1536)
{
target = t;
h = 0;
}
}
BuildBullet(pPlayerActor, nAmmoType, nHeight, nAngle, target, var_1C);
BuildBullet(pPlayerActor, nAmmoType, nHeight, nAngle, target, var_1C, h);
break;
}