UpdateOCF: also update OCF_Inflammable, which can be manipulated by scripts

Previously, changing the ContactIncinerate property in a script would trigger an assertion in a debug build.
shapetextures
David Dormagen 2015-11-10 19:13:52 +01:00
parent a8f7dc6c5e
commit f701dfd703
1 changed files with 4 additions and 1 deletions

View File

@ -883,7 +883,10 @@ void C4Object::UpdateOCF()
#endif
// Keep the bits that only have to be updated with SetOCF (def, category, con, alive, onfire)
OCF=OCF & (OCF_Normal | OCF_Exclusive | OCF_Grab | OCF_FullCon | OCF_Rotate | OCF_OnFire
| OCF_Inflammable | OCF_Alive | OCF_CrewMember | OCF_AttractLightning);
| OCF_Alive | OCF_CrewMember | OCF_AttractLightning);
// OCF_inflammable: can catch fire and is not currently burning.
if (!OnFire && GetPropertyInt(P_ContactIncinerate) > 0)
OCF |= OCF_Inflammable;
// OCF_Carryable: Can be picked up
if (GetPropertyInt(P_Collectible))
OCF|=OCF_Carryable;