fix commands being parsed multiple times; eg. OnCommand=@'"x," .. foo()' can only run foo() once
This commit is contained in:
@@ -91,6 +91,7 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sAniDir, const XNode* pNode
|
|||||||
BGAnimation *p = new BGAnimation;
|
BGAnimation *p = new BGAnimation;
|
||||||
p->LoadFromNode( sAniDir, pNode );
|
p->LoadFromNode( sAniDir, pNode );
|
||||||
pActor = p;
|
pActor = p;
|
||||||
|
return pActor; // we just ran LoadFromNode; don't run it again below
|
||||||
}
|
}
|
||||||
else if(
|
else if(
|
||||||
sType == "GenreDisplay" ||
|
sType == "GenreDisplay" ||
|
||||||
@@ -104,6 +105,7 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sAniDir, const XNode* pNode
|
|||||||
ActorFrame *p = new ActorFrame;
|
ActorFrame *p = new ActorFrame;
|
||||||
p->LoadFromNode( sAniDir, pNode );
|
p->LoadFromNode( sAniDir, pNode );
|
||||||
pActor = p;
|
pActor = p;
|
||||||
|
return pActor; // we just ran LoadFromNode; don't run it again below
|
||||||
}
|
}
|
||||||
else if( sType == "BitmapText" )
|
else if( sType == "BitmapText" )
|
||||||
{
|
{
|
||||||
@@ -293,6 +295,7 @@ retry:
|
|||||||
ASSERT( pActor ); // we should have filled this in above
|
ASSERT( pActor ); // we should have filled this in above
|
||||||
|
|
||||||
// TODO: LoadFromNode should be called when we still have a pointer to the derived type.
|
// TODO: LoadFromNode should be called when we still have a pointer to the derived type.
|
||||||
|
// (Why isn't it virtual?)
|
||||||
pActor->LoadFromNode( sAniDir, pNode );
|
pActor->LoadFromNode( sAniDir, pNode );
|
||||||
|
|
||||||
return pActor;
|
return pActor;
|
||||||
|
|||||||
Reference in New Issue
Block a user