@@ -297,7 +297,8 @@ DEFINE_HOOK(0x469AA4, BulletClass_Logics_Extras, 0x5)
297
297
GET (BulletClass*, pThis, ESI);
298
298
GET_BASE (CoordStruct*, coords, 0x8 );
299
299
300
- auto const pOwner = pThis->Owner ? pThis->Owner ->Owner : BulletExt::ExtMap.Find (pThis)->FirerHouse ;
300
+ auto const pTechno = pThis->Owner ;
301
+ auto const pOwner = pTechno ? pTechno->Owner : BulletExt::ExtMap.Find (pThis)->FirerHouse ;
301
302
302
303
// Extra warheads
303
304
if (pThis->WeaponType )
@@ -336,14 +337,14 @@ DEFINE_HOOK(0x469AA4, BulletClass_Logics_Extras, 0x5)
336
337
continue ;
337
338
338
339
if (isFull)
339
- WarheadTypeExt::DetonateAt (pWH, *coords, pThis-> Owner , damage, pOwner, pThis->Target );
340
+ WarheadTypeExt::DetonateAt (pWH, *coords, pTechno , damage, pOwner, pThis->Target );
340
341
else
341
- WarheadTypeExt::ExtMap.Find (pWH)->DamageAreaWithTarget (*coords, damage, pThis-> Owner , pWH, true , pOwner, abstract_cast<TechnoClass*>(pThis->Target ));
342
+ WarheadTypeExt::ExtMap.Find (pWH)->DamageAreaWithTarget (*coords, damage, pTechno , pWH, true , pOwner, abstract_cast<TechnoClass*>(pThis->Target ));
342
343
}
343
344
}
344
345
345
346
// Return to sender
346
- if (pThis->Type && pThis-> Owner )
347
+ if (pThis->Type && pTechno )
347
348
{
348
349
auto const pTypeExt = BulletTypeExt::ExtMap.Find (pThis->Type );
349
350
@@ -352,13 +353,13 @@ DEFINE_HOOK(0x469AA4, BulletClass_Logics_Extras, 0x5)
352
353
auto damage = pWeapon->Damage ;
353
354
354
355
if (pTypeExt->ReturnWeapon_ApplyFirepowerMult )
355
- damage = static_cast <int >(damage * pThis-> Owner -> FirepowerMultiplier * TechnoExt::ExtMap.Find (pThis-> Owner )->AE .FirepowerMultiplier );
356
+ damage = static_cast <int >(damage * pTechno-> FirepowerMultiplier * TechnoExt::ExtMap.Find (pTechno )->AE .FirepowerMultiplier );
356
357
357
- if (BulletClass* pBullet = pWeapon->Projectile ->CreateBullet (pThis-> Owner , pThis-> Owner ,
358
+ if (BulletClass* pBullet = pWeapon->Projectile ->CreateBullet (pTechno, pTechno ,
358
359
damage, pWeapon->Warhead , pWeapon->Speed , pWeapon->Bright ))
359
360
{
360
- BulletExt::SimulatedFiringUnlimbo (pBullet, pThis-> Owner -> Owner , pWeapon, pThis->Location , true );
361
- BulletExt::SimulatedFiringEffects (pBullet, pThis-> Owner -> Owner , nullptr , false , true );
361
+ BulletExt::SimulatedFiringUnlimbo (pBullet, pOwner , pWeapon, pThis->Location , false );
362
+ BulletExt::SimulatedFiringEffects (pBullet, pOwner , nullptr , false , true );
362
363
}
363
364
}
364
365
}
0 commit comments