- consolidated the check for "is actor an owned inventory item" into a subfunction.
This check occured 9 times in the source, better have it only once.
This commit is contained in:
parent
ee08412e49
commit
319f8743db
8 changed files with 20 additions and 32 deletions
|
|
@ -620,6 +620,14 @@ DEFINE_ACTION_FUNCTION(AActor, InStateSequence)
|
|||
PARAM_POINTER(basestate, FState);
|
||||
ACTION_RETURN_BOOL(self->InStateSequence(newstate, basestate));
|
||||
}
|
||||
|
||||
|
||||
bool AActor::IsMapActor()
|
||||
{
|
||||
// [SP] Don't remove owned inventory objects.
|
||||
return (!IsKindOf(RUNTIME_CLASS(AInventory)) || static_cast<AInventory *>(this)->Owner == nullptr);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// AActor::GetTics
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue