Oolite
Loading...
Searching...
No Matches
OOVisualEffectEntity(SubEntityRelationship) Category Reference

Instance Methods

(BOOL) - isShipWithSubEntityShip: [implementation]

Detailed Description

Definition at line 849 of file OOVisualEffectEntity.m.

Method Documentation

◆ isShipWithSubEntityShip:

- (BOOL) isShipWithSubEntityShip: (Entity*) other
implementation

Extends class OOVisualEffectEntity.

Definition at line 852 of file OOVisualEffectEntity.m.

852 :(Entity*)other
853{
854 assert([self isVisualEffect]);
855
856 if (![other isVisualEffect])
857 return NO;
858 if (![other isSubEntity])
859 return NO;
860 if ([other owner] != self)
861 return NO;
862
863#ifndef NDEBUG
864 // Sanity check; this should always be true.
865 if (![self hasSubEntity:(OOVisualEffectEntity*)other]) {
866 OOLogERR(@"visualeffect.subentity.sanityCheck.failed", @"%@ thinks it's a subentity of %@, but the supposed parent does not agree. %@", [other shortDescription], [self shortDescription], @"This is an internal error, please report it.");
867 [other setOwner:nil];
868 return NO;
869 }
870#endif
871
872 return YES;
873}
#define OOLogERR(class, format,...)
Definition OOLogging.h:125
void setOwner:(Entity *ent)
Definition Entity.m:542

References OOLogERR, and Entity::setOwner:.

Here is the call graph for this function:

The documentation for this category was generated from the following file: