Skip to content

Commit

Permalink
codechange - ScriptEngine: deleted unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp committed May 22, 2022
1 parent 8dbafea commit 0f7d499
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions source/server/ScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,23 +588,6 @@ int ScriptEngine::loadScriptFile(const char *fileName, string &script) {
return 0;
}

// unused method
int ScriptEngine::executeString(std::string command) {
// This method would work if you include the scriptHelper add-on
#if 0
if(!engine) return 0;
if(!context) context = engine->CreateContext();
asIScriptModule* mod = engine->GetModule("script", asGM_CREATE_IF_NOT_EXISTS);
int result = ExecuteString(engine, command.c_str(), mod, context);
if(result<0)
{
Logger::Log(LOG_ERROR, "ScriptEngine: Error while executing string: '" + command + "'.");
}
return result;
#endif // 0
return 0;
}

int ScriptEngine::framestep(float dt) {
if (!engine) return 0;
std::lock_guard<std::mutex> scoped_lock(m_context_mutex);
Expand Down
2 changes: 0 additions & 2 deletions source/server/ScriptEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ class ScriptEngine {

int loadScript(std::string scriptName);

int executeString(std::string command);

void playerDeleted(int uid, int crash);

void playerAdded(int uid);
Expand Down

0 comments on commit 0f7d499

Please sign in to comment.