1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-04-29 23:57:13 +02:00

Fix the player alpha modification.

This commit is contained in:
Sandu Liviu Catalin 2016-06-20 08:08:33 +03:00
parent 5d0a38cbd9
commit e6213d0932
2 changed files with 17 additions and 2 deletions

View File

@ -768,7 +768,16 @@ Int32 CPlayer::GetAlpha() const
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetAlpha(Int32 alpha, Int32 fade) const
void CPlayer::SetAlpha(Int32 alpha) const
{
// Validate the managed identifier
Validate();
// Perform the requested operation
_Func->SetPlayerAlpha(m_ID, alpha, 0);
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetAlphaEx(Int32 alpha, Int32 fade) const
{
// Validate the managed identifier
Validate();
@ -2266,6 +2275,7 @@ void Register_CPlayer(HSQUIRRELVM vm)
.Func(_SC("SetPos"), &CPlayer::SetPositionEx)
.Func(_SC("SetPosition"), &CPlayer::SetPositionEx)
.Func(_SC("SetSpeed"), &CPlayer::SetSpeedEx)
.Func(_SC("SetAlpha"), &CPlayer::SetAlphaEx)
.Func(_SC("Disembark"), &CPlayer::Disembark)
.Func(_SC("SetWeapon"), &CPlayer::SetWeaponEx)
.Func(_SC("GiveWeapon"), &CPlayer::GiveWeapon)

View File

@ -518,7 +518,12 @@ public:
/* --------------------------------------------------------------------------------------------
* Modify the alpha of the managed player entity.
*/
void SetAlpha(Int32 alpha, Int32 fade) const;
void SetAlpha(Int32 alpha) const;
/* --------------------------------------------------------------------------------------------
* Modify the alpha of the managed player entity.
*/
void SetAlphaEx(Int32 alpha, Int32 fade) const;
/* --------------------------------------------------------------------------------------------
* Retrieve the aim position of the managed player entity.