void EntityCommandManager::publishUpdateCommand(Entity* entity) { UpdateCommand* currentUpdateCommand = nullptr; bool available = updateCommandRecycleQueue->take(currentUpdateCommand); if (!available) { currentUpdateCommand = new UpdateCommand(updateCommandRecycleQueue, updateTaskCounter); } currentUpdateCommand->init(entity); WorkerManager::getInstance()->sendCommand(currentUpdateCommand); }