View Single Post
  #6  
Old December 1st, 2008, 10:51 AM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,988
Thanks: 482
Thanked 1,922 Times in 1,250 Posts
Mobhack is on a distinguished road
Default Re: Bail out negates opfire

Quote:
Originally Posted by Koh View Post
Quote:
Originally Posted by Warhero View Post
Koh are you sure that there were even 1 enemy unit somewhere near your vehicle? I mean that enemy had enough firing range to fire your unit and/or there was not any forest/buildings/etc. between vehicle and enemy?
Yeah I'm sure. I've attached a savegame so you can witness the phenomena yourself. First try unloading unit number B2, Merkava MICV. You will trigger around half a dozen opfires. Then reload the saved game and try bailing out that same Merkava MICV. You will trigger no op fires.

- Koh
That is because "bailing" a crew is splitting the unit and creating a brand new crew object, which is not the same as the UnloadUnit code to drop pax who are an already extant game object. UnloadUnit has an opfire trigger, SplitUnit itself does not. (That bit of code to split units was originally hidden debug only code for developer testing, but we exposed it as a useful end user function)

Manually splitting a unit now has a subsequent call to the opfire trigger code called on the newly-generated crew unit (both games). Not added to the unit destruction code - as the firer was targeting the vehicle and the generation of a crew is an unintended by-product.

Andy
Reply With Quote