mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Clean up some getServer() unsafety
This commit is contained in:
@@ -541,8 +541,8 @@ Server* ScriptApiBase::getServer()
|
||||
{
|
||||
// Since the gamedef is the server it's still possible to retrieve it in
|
||||
// e.g. the async environment, but this isn't meant to happen.
|
||||
// TODO: still needs work
|
||||
//assert(getType() == ScriptingType::Server);
|
||||
if (getType() != ScriptingType::Server)
|
||||
return nullptr;
|
||||
return dynamic_cast<Server *>(m_gamedef);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user