- scaleDamage

This commit is contained in:
Christoph Oelckers 2021-05-06 09:02:49 +02:00
parent 544145fe4b
commit 9801ce25dd
2 changed files with 7 additions and 7 deletions

View file

@ -1531,11 +1531,12 @@ bool dudeIsMelee(DBloodActor* actor)
//
//---------------------------------------------------------------------------
void scaleDamage(XSPRITE* pXSprite) {
short curWeapon = gGenDudeExtra[sprite[pXSprite->reference].index].curWeapon;
short weaponType = gGenDudeExtra[sprite[pXSprite->reference].index].weaponType;
signed short* curScale = gGenDudeExtra[sprite[pXSprite->reference].index].dmgControl;
static void scaleDamage(DBloodActor* actor)
{
auto const pXSprite = &actor->x();
short curWeapon = actor->genDudeExtra().curWeapon;
short weaponType = actor->genDudeExtra().weaponType;
signed short* curScale = actor->genDudeExtra().dmgControl;
for (int i = 0; i < kDmgMax; i++)
curScale[i] = getDudeInfo(kDudeModernCustom)->startDamage[i];
@ -2315,7 +2316,7 @@ bool genDudePrepare(spritetype* pSprite, int propId) {
}
case kGenDudePropertyDmgScale:
scaleDamage(pXSprite);
scaleDamage(actor);
if (propId) break;
[[fallthrough]];

View file

@ -228,7 +228,6 @@ short inDuck(AISTATE* aiState);
int genDudeSeqStartId(XSPRITE* pXSprite);
int getRangeAttackDist(spritetype* pSprite, int minDist = 3000, int maxDist = 80000);
int getDispersionModifier(spritetype* pSprite, int minDisp, int maxDisp);
void scaleDamage(XSPRITE* pXSprite);
bool genDudePrepare(spritetype* pSprite, int propId);
void genDudeUpdate(DBloodActor* pSprite);
void genDudePostDeath(spritetype* pSprite, DAMAGE_TYPE damageType, int damage);