1
0

Detaching improvements

* Players now search for an area around themselves to teleport to when
detaching from something
This commit is contained in:
Tiger Wang
2014-01-12 23:23:36 +00:00
parent 1d81db6446
commit edefa27a48
4 changed files with 34 additions and 4 deletions

View File

@@ -1107,9 +1107,11 @@ void cEntity::AttachTo(cEntity * a_AttachTo)
// Already attached to that entity, nothing to do here
return;
}
// Detach from any previous entity:
Detach();
if (m_AttachedTo != NULL)
{
// Detach from any previous entity:
Detach();
}
// Attach to the new entity:
m_AttachedTo = a_AttachTo;