mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Improve the SetAnimation method on player class.
Make it so that the animation group is optional.
This commit is contained in:
parent
7391d9391e
commit
ef41d0d243
@ -1075,7 +1075,16 @@ bool CPlayer::IsCameraLocked() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CPlayer::SetAnimation(Int32 group, Int32 anim) const
|
void CPlayer::SetAnimation(Int32 anim) const
|
||||||
|
{
|
||||||
|
// Validate the managed identifier
|
||||||
|
Validate();
|
||||||
|
// Perform the requested operation
|
||||||
|
_Func->SetPlayerAnimation(m_ID, 0, anim);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CPlayer::SetAnimation(Int32 anim, Int32 group) const
|
||||||
{
|
{
|
||||||
// Validate the managed identifier
|
// Validate the managed identifier
|
||||||
Validate();
|
Validate();
|
||||||
@ -2166,8 +2175,6 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("RemoveWeapon"), &CPlayer::RemoveWeapon)
|
.Func(_SC("RemoveWeapon"), &CPlayer::RemoveWeapon)
|
||||||
.Func(_SC("StripWeapons"), &CPlayer::StripWeapons)
|
.Func(_SC("StripWeapons"), &CPlayer::StripWeapons)
|
||||||
.Func(_SC("RestoreCamera"), &CPlayer::RestoreCamera)
|
.Func(_SC("RestoreCamera"), &CPlayer::RestoreCamera)
|
||||||
.Func(_SC("SetAnim"), &CPlayer::SetAnimation)
|
|
||||||
.Func(_SC("Animation"), &CPlayer::SetAnimation)
|
|
||||||
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
||||||
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
||||||
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
||||||
@ -2198,6 +2205,10 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
(_SC("StartStream"), &CPlayer::StartStream)
|
(_SC("StartStream"), &CPlayer::StartStream)
|
||||||
.Overload< void (CPlayer::*)(Uint32) >
|
.Overload< void (CPlayer::*)(Uint32) >
|
||||||
(_SC("StartStream"), &CPlayer::StartStream)
|
(_SC("StartStream"), &CPlayer::StartStream)
|
||||||
|
.Overload< void (CPlayer::*)(Int32) const >
|
||||||
|
(_SC("SetAnimation"), &CPlayer::SetAnimation)
|
||||||
|
.Overload< void (CPlayer::*)(Int32, Int32) const >
|
||||||
|
(_SC("SetAnimation"), &CPlayer::SetAnimation)
|
||||||
// Raw Squirrel Methods
|
// Raw Squirrel Methods
|
||||||
.SquirrelFunc(_SC("Msg"), &CPlayer::Msg)
|
.SquirrelFunc(_SC("Msg"), &CPlayer::Msg)
|
||||||
.SquirrelFunc(_SC("MsgP"), &CPlayer::MsgP)
|
.SquirrelFunc(_SC("MsgP"), &CPlayer::MsgP)
|
||||||
|
@ -663,7 +663,12 @@ public:
|
|||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Modify the animation of the managed player entity.
|
* Modify the animation of the managed player entity.
|
||||||
*/
|
*/
|
||||||
void SetAnimation(Int32 group, Int32 anim) const;
|
void SetAnimation(Int32 anim) const;
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
* Modify the animation of the managed player entity.
|
||||||
|
*/
|
||||||
|
void SetAnimation(Int32 anim, Int32 group) const;
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Retrieve the vehicle that the managed player entity is standing on.
|
* Retrieve the vehicle that the managed player entity is standing on.
|
||||||
|
Loading…
Reference in New Issue
Block a user