Skip to content

Commit 9fdb186

Browse files
committed
Use logic_error
1 parent a6f1cee commit 9fdb186

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Server/mods/deathmatch/logic/CBuilding.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ CBuilding::CBuilding(const CBuilding& Copy) : CElement(Copy.m_pParent), m_pLowLo
4848
m_vecPosition = Copy.m_vecPosition;
4949
m_vecRotation = Copy.m_vecRotation;
5050
m_bCollisionsEnabled = Copy.m_bCollisionsEnabled;
51+
m_pHighLodBuilding = nullptr;
5152

5253
// Add us to the manager's list
5354
m_pBuildingManager->AddToList(this);

Server/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ CBuilding* CLuaBuildingDefs::CreateBuilding(lua_State* const luaVM, std::uint16_
4343
// Get the resource we belong to
4444
CResource* pResource = pLuaMain->GetResource();
4545
if (!pResource)
46-
throw std::exception("Cannot be done in current environment");
46+
throw std::logic_error("Cannot be done in current environment");
4747

4848
const CMtaVersion& minClientVersion = pResource->GetMinClientFromMetaXml();
4949

5050
if (minClientVersion < CMtaVersion(SERVERSIDE_BUILDING_MIN_CLIENT_VERSION))
51-
throw std::exception("Expected client min_mta_version in meta.xml hinger or equal than " SERVERSIDE_BUILDING_MIN_CLIENT_VERSION);
51+
throw std::logic_error("Expected client min_mta_version in meta.xml hinger or equal than " SERVERSIDE_BUILDING_MIN_CLIENT_VERSION);
5252

5353
if (!CBuildingManager::IsValidModel(modelId))
5454
throw std::invalid_argument("Invalid building model id");

0 commit comments

Comments
 (0)