Pass ActorCommand structures to Actor instead of unparsed command strings.
This way, we can potentially do the parsing early and not parse inside of Actor as the command is executing.
This commit is contained in:
@@ -52,7 +52,7 @@ CString ActorCommand::GetOriginalCommandString() const
|
||||
return join( ",", asTokens );
|
||||
}
|
||||
|
||||
void ParseCommands( const CString &sCommands, vector<ActorCommand> &vCommandsOut )
|
||||
void ParseActorCommands( const CString &sCommands, ActorCommands &vCommandsOut )
|
||||
{
|
||||
vCommandsOut.clear();
|
||||
CStringArray vsCommands;
|
||||
@@ -68,6 +68,13 @@ void ParseCommands( const CString &sCommands, vector<ActorCommand> &vCommandsOut
|
||||
}
|
||||
}
|
||||
|
||||
ActorCommands ParseActorCommands( const CString &sCommands )
|
||||
{
|
||||
ActorCommands vCommands;
|
||||
ParseActorCommands( sCommands, vCommands );
|
||||
return vCommands;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user