/////////////////////////////////////////////////////////////////////
| 3222 | |
| 3223 | ////////////////////////////////////////////////////////////////////////// |
| 3224 | int CScriptObjectEntity::GotoState(IFunctionHandler *pH) |
| 3225 | { |
| 3226 | CHECK_PARAMETERS(1); |
| 3227 | |
| 3228 | const char *sState; |
| 3229 | pH->GetParam(1,sState); |
| 3230 | |
| 3231 | bool res = false; |
| 3232 | if (sState) |
| 3233 | { |
| 3234 | if(!m_pEntity->IsStateClientside() && !GetISystem()->GetIGame()->GetModuleState( EGameServer )) |
| 3235 | { |
| 3236 | // GotoState should only be called on the client when StateClientSide is on for this entity |
| 3237 | CryLog("\001ERROR: ScriptObjectEntity:GotoState on the client! (EntityClass:'%s' Name:'%s', State:'%s')", |
| 3238 | m_pEntity->GetEntityClassName(), m_pEntity->GetName(), sState); |
| 3239 | } |
| 3240 | res = m_pEntity->GotoState(sState); |
| 3241 | } |
| 3242 | return pH->EndFunction(res); |
| 3243 | } |
| 3244 | |
| 3245 | ////////////////////////////////////////////////////////////////////////// |
| 3246 | int CScriptObjectEntity::IsInState(IFunctionHandler *pH) |
nothing calls this directly
no test coverage detected