removed possible crash

Tobias Zwick 2010-09-12 16:03:49 +02:00
parent 2a6e2cbc89
commit 419b12a5e4
2 changed files with 2 additions and 2 deletions

View File

@ -531,6 +531,8 @@ void C4Object::MovePosition(int32_t dx, int32_t dy)
bool C4Object::ExecMovement() // Every Tick1 by Execute
{
// update in which material this object is
UpdateInMat();
// Containment check
if (Contained)

View File

@ -760,7 +760,6 @@ void C4Object::SetOCF()
else if (Contained && !Contained->Status)
{ LogF("Warning: contained in deleted object %p (%s)!", static_cast<void*>(Contained), Contained->GetName()); }
#endif
UpdateInMat();
// OCF_Normal: The OCF is never zero
OCF=OCF_Normal;
// OCF_Construct: Can be built outside
@ -896,7 +895,6 @@ void C4Object::UpdateOCF()
else if (Contained && !Contained->Status)
{ LogF("Warning: contained in deleted object %p (%s)!", static_cast<void*>(Contained), Contained->GetName()); }
#endif
UpdateInMat();
// Keep the bits that only have to be updated with SetOCF (def, category, con, alive, onfire)
OCF=OCF & (OCF_Normal | OCF_Exclusive | OCF_Edible | OCF_Grab | OCF_FullCon
/*| OCF_Chop - now updated regularly, see below */