Skip to content

Commit 0ea3cee

Browse files
committed
Review comments
1 parent a49a08c commit 0ea3cee

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

Client/game_sa/CEntitySA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ bool CEntitySA::SetBoneScale(eBone boneId, const CVector& scale)
665665
if (!rwBoneMatrix)
666666
return false;
667667

668-
RwMatrixScale(rwBoneMatrix, (RwV3d*)&scale, TRANSFORM_BEFORE);
668+
RwMatrixScale(rwBoneMatrix, reinterpret_cast<const RwV3d*>(&scale), TRANSFORM_BEFORE);
669669
return true;
670670
}
671671

Client/mods/deathmatch/logic/CClientPed.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,10 +1130,7 @@ CVector* CClientPed::GetTransformedBonePosition(eBone bone, CVector& vecPosition
11301130

11311131
bool CClientPed::SetBoneScale(eBone boneId, const CVector& scale)
11321132
{
1133-
if (!m_pPlayerPed)
1134-
return false;
1135-
1136-
if (boneId < BONE_ROOT || boneId > BONE_LEFTBREAST)
1133+
if (!m_pPlayerPed || boneId < BONE_ROOT || boneId > BONE_LEFTBREAST)
11371134
return false;
11381135

11391136
m_boneScales[boneId] = scale;

Client/mods/deathmatch/logic/CClientPed.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CClientPed;
2424
#include <game/CPad.h>
2525
#include <game/TaskTypes.h>
2626
#include <game/CPed.h>
27-
#include <map>
27+
#include <unordered_map>
2828

2929
class CAnimBlock;
3030
class CClientCamera;
@@ -816,13 +816,12 @@ class CClientPed : public CClientStreamElement, public CAntiCheatModule
816816
bool m_animationOverridedByClient{};
817817

818818
// Bone scaling
819-
std::map<eBone, CVector> m_boneScales;
819+
std::unordered_map<eBone, CVector> m_boneScales;
820820

821821
public:
822822
bool SetBoneScale(eBone boneId, const CVector& scale);
823823
bool GetBoneScale(eBone boneId, CVector& scale) const;
824824
bool ResetBoneScale(eBone boneId);
825825
void ResetAllBoneScales();
826826
void ApplyBoneScales();
827-
bool HasBoneScales() const { return !m_boneScales.empty(); }
828827
};

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,10 +1151,9 @@ bool CLuaPedDefs::ResetElementBoneScale(CClientPed* ped, const std::uint16_t bon
11511151
return ped->ResetBoneScale(static_cast<eBone>(bone));
11521152
}
11531153

1154-
bool CLuaPedDefs::ResetAllElementBoneScales(CClientPed* ped)
1154+
void CLuaPedDefs::ResetAllElementBoneScales(CClientPed* ped)
11551155
{
11561156
ped->ResetAllBoneScales();
1157-
return true;
11581157
}
11591158

11601159
bool CLuaPedDefs::UpdateElementRpHAnim(CClientPed* ped)

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CLuaPedDefs : public CLuaDefs
6464
static bool SetElementBoneScale(CClientPed* ped, const std::uint16_t bone, const float scaleX, const float scaleY, const float scaleZ);
6565

6666
static bool ResetElementBoneScale(CClientPed* ped, const std::uint16_t bone);
67-
static bool ResetAllElementBoneScales(CClientPed* ped);
67+
static void ResetAllElementBoneScales(CClientPed* ped);
6868

6969
static bool UpdateElementRpHAnim(CClientPed* ped);
7070

0 commit comments

Comments
 (0)