Skip to content
Permalink
Browse files

Merge pull request #957 from StrixG/798-startresource

Fix #798: Pin down startResource and stopResource behaviour
  • Loading branch information...
qaisjp committed May 26, 2019
2 parents b07b2e7 + ade3bf9 commit a4a9fa053ba5f1c16e30f843579bb9a8724015db
Showing with 4 additions and 2 deletions.
  1. +4 −2 Server/mods/deathmatch/logic/luadefs/CLuaResourceDefs.cpp
@@ -492,7 +492,7 @@ int CLuaResourceDefs::startResource(lua_State* luaVM)
// In the event 'onResourcePreStart' the resource will be in the 'starting' state
// and in the event 'onResourceStart' the resource is already in the 'running' state
// and you can't force-start resources in the 'stopping' state
lua_pushboolean(luaVM, true);
lua_pushboolean(luaVM, false);
}
else if (pResource->IsLoaded())
{
@@ -577,9 +577,11 @@ int CLuaResourceDefs::stopResource(lua_State* luaVM)

// Schedule it for a stop
m_pResourceManager->QueueResource(pResource, CResourceManager::QUEUE_STOP, nullptr);
lua_pushboolean(luaVM, true);
return 1;
}

lua_pushboolean(luaVM, true);
lua_pushboolean(luaVM, false);
return 1;
}

0 comments on commit a4a9fa0

Please sign in to comment.
You can’t perform that action at this time.