Skip to content
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Server/mods/deathmatch/logic/CHandlingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ static tHandlingData m_OriginalHandlingData[HT_MAX];
static std::unique_ptr<CHandlingEntry> m_OriginalEntries[HT_MAX];

// Model handling data
static std::unordered_map<std::size_t, std::unique_ptr<CHandlingEntry>> m_ModelEntries;
static std::unordered_map<std::size_t, bool> m_bModelHandlingChanged;
static std::unordered_map<std::uint32_t, std::unique_ptr<CHandlingEntry>> m_ModelEntries;
static std::unordered_map<std::uint32_t, bool> m_ModelHandlingChanged;

static std::map<std::string, eHandlingProperty> m_HandlingNames;

Expand Down Expand Up @@ -142,21 +142,21 @@ bool CHandlingManager::HasModelHandlingChanged(std::uint32_t model) const noexce
return false;

// Return if we have changed
return m_bModelHandlingChanged[model];
return m_ModelHandlingChanged[model];
}

void CHandlingManager::SetModelHandlingHasChanged(std::uint32_t model, bool bChanged) const noexcept
void CHandlingManager::SetModelHandlingHasChanged(std::uint32_t model, bool changed) const noexcept
{
// Within range?
if (!CVehicleManager::IsValidModel(model))
return;

// Return if we have changed.
m_bModelHandlingChanged[model] = bChanged;
m_ModelHandlingChanged[model] = changed;
}

// Return the handling manager id
eHandlingTypes CHandlingManager::GetHandlingID(std::uint32_t model) const noexcept
eHandlingTypes CHandlingManager::GetHandlingID(std::uint32_t model) noexcept
{
switch (model)
{
Expand Down
4 changes: 2 additions & 2 deletions Server/mods/deathmatch/logic/CHandlingManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class CHandlingManager
const CHandlingEntry* GetOriginalHandlingData(std::uint32_t model) const noexcept;
CHandlingEntry* GetModelHandlingData(std::uint32_t model) const noexcept;

eHandlingTypes GetHandlingID(std::uint32_t model) const noexcept;
static eHandlingTypes GetHandlingID(std::uint32_t model) noexcept;

// Helper functions
eHandlingProperty GetPropertyEnumFromName(const std::string& name) const noexcept;
bool HasModelHandlingChanged(std::uint32_t model) const noexcept;
void SetModelHandlingHasChanged(std::uint32_t model, bool bChanged) const noexcept;
void SetModelHandlingHasChanged(std::uint32_t model, bool changed) const noexcept;

private:
void InitializeDefaultHandlings() noexcept;
Expand Down
Loading