Fixed #49 being able to parent an entity to itself, which resulted in infinite infinite loops everywhere! D:

This commit is contained in:
2016-01-27 18:06:33 +01:00
parent 65da634c71
commit 13f020ddf5
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -759,7 +759,7 @@ void EditorGUI::entityDelete(EntityWrapper entity)
void EditorGUI::entityChangeParent(EntityWrapper entity, EntityWrapper parent)
{
if (entity == parent) {
if (entity == parent || parent.IsChildOf(entity)) {
return;
}