Skip to content

Commit

Permalink
update function name
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeulater committed Nov 4, 2023
1 parent 8750cba commit ea1b192
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/game/players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ datum s_player::get_unit_index(datum player_index)
return get(player_index)->unit_index;
}

uint8* s_player::get_player_unit(datum player_index)
uint8* s_player::get_player_unit_data(datum player_index)
{
datum unit_datum = s_player::get_unit_index(player_index);
if (DATUM_IS_NONE(unit_datum))
Expand All @@ -108,7 +108,7 @@ uint8* s_player::get_player_unit(datum player_index)

real_vector3d* s_player::get_unit_coords(datum player_index)
{
uint8* player_unit = get_player_unit(player_index);
uint8* player_unit = get_player_unit_data(player_index);
if (player_unit != nullptr)
return reinterpret_cast<real_point3d*>(player_unit + 0x64);

Expand Down
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/game/players.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ struct s_player
static void set_unit_speed(datum player_index, float speed);
static const wchar_t* get_name(datum player_index);
static datum get_unit_index(datum player_index);
static uint8* get_player_unit(datum player_index);
static uint8* get_player_unit_data(datum player_index);
static real_vector3d* get_unit_coords(datum player_index);
static uint64 get_id(datum player_index);
};
Expand Down
2 changes: 1 addition & 1 deletion xlive/H2MOD/GUI/XLiveRendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ HRESULT WINAPI XLiveRender()
while (player_it.get_next_active_player())
{
real_point3d* player_position = s_player::get_unit_coords(player_it.get_current_player_index());
object_datum* biped_unit = (object_datum*)s_player::get_player_unit(player_it.get_current_player_index());
object_datum* biped_unit = (object_datum*)s_player::get_player_unit_data(player_it.get_current_player_index());
if (player_position != nullptr) {
std::wstring playerNameWide(player_it.get_current_player_name());
std::string playerName(playerNameWide.begin(), playerNameWide.end());
Expand Down
8 changes: 4 additions & 4 deletions xlive/H2MOD/GUI/imgui_integration/Console/ComVar.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ class ComVarT : public IComVar
}

template<>
void SetValFromStrInternal<long>(const std::string& str, int _Base)
void SetValFromStrInternal<unsigned int>(const std::string& str, int _Base)
{
baseTypeT& val = Get();
val = std::stol(str, nullptr, _Base);
val = std::stoul(str, nullptr, _Base);
}

template<>
void SetValFromStrInternal<unsigned int>(const std::string& str, int _Base)
void SetValFromStrInternal<long>(const std::string& str, int _Base)
{
baseTypeT& val = Get();
val = std::stoul(str, nullptr, _Base);
val = std::stol(str, nullptr, _Base);
}

template<>
Expand Down

0 comments on commit ea1b192

Please sign in to comment.