func_tracktrain: if no globalname is defined, and/or relation target is unset, don't attempt to reposition
This commit is contained in:
parent
9b9988232f
commit
c1eb4bcb99
|
@ -470,6 +470,17 @@ func_tracktrain::Restore(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
func_tracktrain::TransitionComplete(void)
|
func_tracktrain::TransitionComplete(void)
|
||||||
{
|
{
|
||||||
|
/* don't mess with this entity if it wasn't carrying over from someplace */
|
||||||
|
if (!m_strGlobalName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* it might have a globalname, but we may not have been carrying over the the next
|
||||||
|
level yet! */
|
||||||
|
if (m_vecRelationTarget == g_vec_null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* targetting something, which was used as a reference point */
|
/* targetting something, which was used as a reference point */
|
||||||
if (HasTriggerTarget() == true) {
|
if (HasTriggerTarget() == true) {
|
||||||
path_track targetEnt = GetTrackNodeForward();
|
path_track targetEnt = GetTrackNodeForward();
|
||||||
|
|
Loading…
Reference in New Issue