Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed Apr 28, 2022
1 parent 17424e7 commit 78bd5f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Code/components/console/Setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ template <typename T, class TStorage = detail::FixedStorage<T>> class Setting :
return static_cast<Tas>(data.as_uint64);
}

float as_float() const
{
return data.as_float;
}

operator bool()
{
static_assert(std::is_same_v<T, bool>, "Must be a boolean");
Expand Down
2 changes: 1 addition & 1 deletion Code/server/Services/PlayerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void PlayerService::HandleInteriorCellEnter(const PacketEvent<EnterInteriorCellR

void PlayerService::OnPlayerRespawnRequest(const PacketEvent<PlayerRespawnRequest>& acMessage) const noexcept
{
float goldLossFactor = fGoldLossFactor.value();
float goldLossFactor = fGoldLossFactor.as_float();

if (goldLossFactor == 0.0)
return;
Expand Down

0 comments on commit 78bd5f1

Please sign in to comment.