~ares-developers/ares/gd03

« back to all changes in this revision

Viewing changes to src/Ext/Building/Hooks.Firewall.cpp

  • Committer: Zimmermann Gyula
  • Date: 2012-09-22 13:23:15 UTC
  • mfrom: (825.1.41)
  • Revision ID: git-v1:28613a17bb384e20bb2b95b5fbb0d9dfb903eaab
Merge remote-tracking branch 'origin/v02' into gd03

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
DEFINE_HOOK(6FCD1D, TechnoClass_GetObjectActivityState_CanTargetFirewall, 5)
232
232
{
233
233
        GET(TechnoClass *, Src, ESI);
234
 
        GET_STACK(TechnoClass *, Tgt, 0x24);
 
234
        GET_STACK(AbstractClass *, Tgt, 0x24);
235
235
        GET_STACK(int, idxWeapon, 0x28);
236
236
 
237
237
        WeaponTypeClass *Weapon = Src->GetWeapon(idxWeapon)->WeaponType;
240
240
        }
241
241
 
242
242
        BulletTypeExt::ExtData *pBulletData = BulletTypeExt::ExtMap.Find(Weapon->Projectile);
243
 
        if(!pBulletData->SubjectToFirewall) {
 
243
 
 
244
        if(!pBulletData->SubjectToFirewall || !HouseExt::IsAnyFirestormActive) {
244
245
                return 0;
245
246
        }
246
247
 
 
248
        CoordStruct crdTgt;
 
249
        Tgt->GetCoords(&crdTgt);
 
250
 
247
251
        FirestormFinderApplicator FireFinder(Src->Owner);
248
252
 
249
 
        CellSequence Path(&Src->Location, &Tgt->Location);
 
253
        CellSequence Path(&Src->Location, &crdTgt);
250
254
 
251
255
        Path.Apply(FireFinder);
252
256