File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -341,15 +341,18 @@ Bool MultiAddOnContain::isPassengerAllowedToFire(ObjectID id) const
341341 return FALSE ;
342342
343343 // if (id == INVALID_ID && m_addOnList.size() > 0) {
344- // return TRUE; // This handles cases where we just check if we can attack at all.
344+ // return TRUE; // This handles cases where we just check if we can attack at all.
345345 // }
346346
347- // Wait, the portable structures aren't actually contained, so we skip this
348- // for (std::vector<AddOnSlotData>::iterator it = m_addOnSlots.begin(); it != m_addOnSlots.end(); ) {
349- // if (*it->portableID == id && id != INVALID_ID) {
350- // return TRUE; // Portable structures can always fire
351- // }
352- // }
347+ // Wait, the portable structures aren't actually contained, so we skip this -- no we don't!
348+ if (id != INVALID_ID)
349+ {
350+ for (Object* addOn : m_addOnList) {
351+ if (addOn->getID () == id) {
352+ return TRUE ;
353+ }
354+ }
355+ }
353356
354357 return TransportContain::isPassengerAllowedToFire (id); // extend for everything else
355358}
You can’t perform that action at this time.
0 commit comments