Skip to content

Commit 31f2f2a

Browse files
committed
Fix code for ExtraWarheads/ReturnWeapon concerning FirerHouse
1 parent 0449bdd commit 31f2f2a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Ext/Bullet/Hooks.DetonateLogics.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,13 @@ DEFINE_HOOK(0x469AA4, BulletClass_Logics_Extras, 0x5)
302302
// Extra warheads
303303
if (pThis->WeaponType)
304304
{
305+
auto const pOwner = pThis->Owner ? pThis->Owner->Owner : BulletExt::ExtMap.Find(pThis)->FirerHouse;
305306
auto const pWeaponExt = WeaponTypeExt::ExtMap.Find(pThis->WeaponType);
306307
int defaultDamage = pThis->WeaponType->Damage;
307308

308309
for (size_t i = 0; i < pWeaponExt->ExtraWarheads.size(); i++)
309310
{
310311
auto const pWH = pWeaponExt->ExtraWarheads[i];
311-
auto const pOwner = pThis->Owner ? pThis->Owner->Owner : BulletExt::ExtMap.Find(pThis)->FirerHouse;
312312
int damage = defaultDamage;
313313
size_t size = pWeaponExt->ExtraWarheads_DamageOverrides.size();
314314

@@ -359,9 +359,6 @@ DEFINE_HOOK(0x469AA4, BulletClass_Logics_Extras, 0x5)
359359
pWeapon->Damage, pWeapon->Warhead, pWeapon->Speed, pWeapon->Bright))
360360
{
361361
pBullet->WeaponType = pWeapon;
362-
auto const pBulletExt = BulletExt::ExtMap.Find(pBullet);
363-
pBulletExt->FirerHouse = pBulletExt->FirerHouse;
364-
365362
pBullet->MoveTo(pThis->Location, BulletVelocity::Empty);
366363
}
367364
}

0 commit comments

Comments
 (0)