void CComponentManager::Script_PostMessage(void* cbdata, int ent, int mtid, CScriptVal data) { CComponentManager* componentManager = static_cast<CComponentManager*> (cbdata); CMessage* msg = componentManager->ConstructMessage(mtid, data); if (!msg) return; // error componentManager->PostMessage(ent, *msg); delete msg; }
void CComponentManager::Script_PostMessage(ScriptInterface::CxPrivate* pCxPrivate, int ent, int mtid, CScriptVal data) { CComponentManager* componentManager = static_cast<CComponentManager*> (pCxPrivate->pCBData); CMessage* msg = componentManager->ConstructMessage(mtid, data); if (!msg) return; // error componentManager->PostMessage(ent, *msg); delete msg; }