mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 07:07:13 +02:00
Candidate for backwards compatibility.
This commit is contained in:
@ -239,7 +239,7 @@ CSStr CPlayer::GetUID2() const
|
||||
// Return the requested information
|
||||
return s_Buffer;
|
||||
}
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::Kill() const
|
||||
{
|
||||
@ -248,7 +248,7 @@ void CPlayer::Kill() const
|
||||
// Perform the requested operation
|
||||
_Func->KillPlayer(m_ID);
|
||||
}
|
||||
|
||||
#endif
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::Kick() const
|
||||
{
|
||||
@ -400,7 +400,7 @@ void CPlayer::SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj &
|
||||
Core::Get().EmitPlayerOption(m_ID, option_id, current, header, payload);
|
||||
}
|
||||
}
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQFloat CPlayer::GetNetworkStatisticsF(Int32 option_id) const
|
||||
{
|
||||
@ -422,7 +422,7 @@ SQInteger CPlayer::GetNetworkStatisticsI(Int32 option_id) const
|
||||
// Return it in the proper type
|
||||
return static_cast< SQInteger >(value);
|
||||
}
|
||||
|
||||
#endif
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CPlayer::GetWorld() const
|
||||
{
|
||||
@ -1407,7 +1407,7 @@ void CPlayer::Unspectate() const
|
||||
// Spectate the given target
|
||||
_Func->SetPlayerSpectateTarget(m_ID, -1);
|
||||
}
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::SetPlayer3DArrow(CPlayer & target, bool toggle) const
|
||||
{
|
||||
@ -1460,7 +1460,7 @@ bool CPlayer::InterpolateCameraLookAtEx(Float32 x, Float32 y, Float32 z, Uint32
|
||||
// Perform the requested operation
|
||||
return _Func->InterpolateCameraLookAt(m_ID, x, y, z, ms) != vcmpErrorRequestDenied;
|
||||
}
|
||||
|
||||
#endif
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::Redirect(StackStrF & ip, Uint32 port, StackStrF & nick,
|
||||
StackStrF & server_pass, StackStrF & user_pass)
|
||||
@ -1492,7 +1492,7 @@ void CPlayer::PlaySound(Int32 sound_id) const
|
||||
// Perform the requested operation
|
||||
_Func->PlaySound(_Func->GetPlayerUniqueWorld(m_ID), sound_id, NAN, NAN, NAN);
|
||||
}
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::SetDrunkHandling(SQInteger level) const
|
||||
{
|
||||
@ -1528,7 +1528,7 @@ SQInteger CPlayer::GetDrunkVisuals() const
|
||||
// Perform the requested operation
|
||||
return _Func->GetPlayerDrunkVisuals(m_ID);
|
||||
}
|
||||
|
||||
#endif
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LightObj & CPlayer::CreateCheckpointEx(Int32 world, bool sphere, Float32 x, Float32 y, Float32 z,
|
||||
Uint8 r, Uint8 g, Uint8 b, Uint8 a, Float32 radius) const
|
||||
@ -2793,8 +2793,10 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Away"), &CPlayer::IsAway)
|
||||
.Prop(_SC("Spec"), &CPlayer::GetSpectator, &CPlayer::SetSpectator)
|
||||
.Prop(_SC("SpecID"), &CPlayer::GetSpectatorID, &CPlayer::SetSpectatorID)
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
.Prop(_SC("DrunkHandling"), &CPlayer::GetDrunkHandling, &CPlayer::SetDrunkHandling)
|
||||
.Prop(_SC("DrunkVisuals"), &CPlayer::GetDrunkVisuals, &CPlayer::SetDrunkVisuals)
|
||||
#endif
|
||||
.Prop(_SC("CollideAreas"), &CPlayer::GetCollideAreas, &CPlayer::SetCollideAreas)
|
||||
.Prop(_SC("Authority"), &CPlayer::GetAuthority, &CPlayer::SetAuthority)
|
||||
.Prop(_SC("TrackPosition"), &CPlayer::GetTrackPosition, &CPlayer::SetTrackPosition)
|
||||
@ -2815,7 +2817,9 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Blue"), &CPlayer::GetColorB, &CPlayer::SetColorB)
|
||||
// Member Methods
|
||||
.Func(_SC("StreamedFor"), &CPlayer::IsStreamedFor)
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
.Func(_SC("Kill"), &CPlayer::Kill)
|
||||
#endif
|
||||
.Func(_SC("Kick"), &CPlayer::Kick)
|
||||
.Func(_SC("Ban"), &CPlayer::Ban)
|
||||
.Func(_SC("KickBecause"), &CPlayer::KickBecause)
|
||||
@ -2824,8 +2828,10 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
||||
.Func(_SC("GetOption"), &CPlayer::GetOption)
|
||||
.Func(_SC("SetOption"), &CPlayer::SetOption)
|
||||
.Func(_SC("SetOptionEx"), &CPlayer::SetOptionEx)
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
.Func(_SC("GetNetworkStatisticsF"), &CPlayer::GetNetworkStatisticsF)
|
||||
.Func(_SC("GetNetworkStatisticsI"), &CPlayer::GetNetworkStatisticsI)
|
||||
#endif
|
||||
.Func(_SC("WorldCompatible"), &CPlayer::IsWorldCompatible)
|
||||
.Func(_SC("SetColor"), &CPlayer::SetColorEx)
|
||||
.Func(_SC("SetColour"), &CPlayer::SetColorEx)
|
||||
@ -2847,12 +2853,14 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
||||
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
||||
.Func(_SC("Unspectate"), &CPlayer::Unspectate)
|
||||
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
.Func(_SC("SetPlayer3DArrow"), &CPlayer::SetPlayer3DArrow)
|
||||
.Func(_SC("GetPlayer3DArrow"), &CPlayer::GetPlayer3DArrow)
|
||||
.Func(_SC("SetPlayer3DArrowID"), &CPlayer::SetPlayer3DArrowID)
|
||||
.Func(_SC("GetPlayer3DArrowID"), &CPlayer::GetPlayer3DArrowID)
|
||||
.Func(_SC("InterpolateCameraLookAt"), &CPlayer::InterpolateCameraLookAt)
|
||||
.Func(_SC("InterpolateCameraLookAtEx"), &CPlayer::InterpolateCameraLookAtEx)
|
||||
#endif
|
||||
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
||||
.Func(_SC("GetModuleList"), &CPlayer::GetModuleList)
|
||||
.Func(_SC("PlaySound"), &CPlayer::PlaySound)
|
||||
|
@ -264,12 +264,12 @@ public:
|
||||
* Retrieve the unique user identifier version 2 of the managed player entity.
|
||||
*/
|
||||
CSStr GetUID2() const;
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set player's health to 0 and reset the death reason.
|
||||
*/
|
||||
void Kill() const;
|
||||
|
||||
#endif
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Kick the managed player entity from the server.
|
||||
*/
|
||||
@ -324,7 +324,7 @@ public:
|
||||
* Modify the current option value of the managed player entity.
|
||||
*/
|
||||
void SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj & payload);
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve network statistics related to the managed player entity.
|
||||
*/
|
||||
@ -334,7 +334,7 @@ public:
|
||||
* Retrieve network statistics related to the managed player entity.
|
||||
*/
|
||||
SQInteger GetNetworkStatisticsI(Int32 option_id) const;
|
||||
|
||||
#endif
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the world in which the managed player entity exists.
|
||||
*/
|
||||
@ -754,7 +754,7 @@ public:
|
||||
* Set the managed player entity to spectate no one.
|
||||
*/
|
||||
void Unspectate() const;
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set whether the target player will see an objective arrow over a player.
|
||||
*/
|
||||
@ -784,7 +784,7 @@ public:
|
||||
* Smoothly pivots the camera angle.
|
||||
*/
|
||||
bool InterpolateCameraLookAtEx(Float32 x, Float32 y, Float32 z, Uint32 ms) const;
|
||||
|
||||
#endif
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Redirect the managed player entity to the specified server.
|
||||
*/
|
||||
@ -800,7 +800,7 @@ public:
|
||||
* Retrieve the authority level of the managed player entity.
|
||||
*/
|
||||
void PlaySound(Int32 sound_id) const;
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set how delayed a player's turn handling is when in a vehicle.
|
||||
*/
|
||||
@ -820,7 +820,7 @@ public:
|
||||
* Retrieve how intense the drunk blur overlay is for a player.
|
||||
*/
|
||||
SQInteger GetDrunkVisuals() const;
|
||||
|
||||
#endif
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Create a checkpoint or sphere for this player.
|
||||
*/
|
||||
|
@ -1147,7 +1147,7 @@ bool CVehicle::Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) co
|
||||
return (_Func->PutPlayerInVehicle(player.GetID(), m_ID, slot, allocate, warp)
|
||||
!= vcmpErrorRequestDenied);
|
||||
}
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::SetPlayer3DArrow(CPlayer & target, bool toggle) const
|
||||
{
|
||||
@ -1183,7 +1183,7 @@ bool CVehicle::GetPlayer3DArrowID(SQInteger id) const
|
||||
// Spectate the given target
|
||||
return _Func->GetVehicle3DArrowForPlayer(m_ID, id);
|
||||
}
|
||||
|
||||
#endif
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CVehicle::GetCollideAreas() const
|
||||
{
|
||||
@ -2074,10 +2074,12 @@ void Register_CVehicle(HSQUIRRELVM vm)
|
||||
.Func(_SC("SetHandlingRule"), &CVehicle::SetHandlingRule)
|
||||
.Func(_SC("ResetHandlingRule"), &CVehicle::ResetHandlingRule)
|
||||
.Func(_SC("ResetHandlings"), &CVehicle::ResetHandlings)
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
.Func(_SC("SetPlayer3DArrow"), &CVehicle::SetPlayer3DArrow)
|
||||
.Func(_SC("GetPlayer3DArrow"), &CVehicle::GetPlayer3DArrow)
|
||||
.Func(_SC("SetPlayer3DArrowID"), &CVehicle::SetPlayer3DArrowID)
|
||||
.Func(_SC("GetPlayer3DArrowID"), &CVehicle::GetPlayer3DArrowID)
|
||||
#endif
|
||||
.Func(_SC("AreasCollide"), &CVehicle::SetAreasCollide)
|
||||
// Member Overloads
|
||||
.Overload< void (CVehicle::*)(const Vector3 &, bool) const >
|
||||
|
@ -621,7 +621,7 @@ public:
|
||||
* Embark the specified player entity into the managed vehicle entity.
|
||||
*/
|
||||
bool Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) const;
|
||||
|
||||
#if SQMOD_SDK_LEAST(2, 1)
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set whether the target player will see an objective arrow over a vehicle.
|
||||
*/
|
||||
@ -641,7 +641,7 @@ public:
|
||||
* See whether the target player sees an objective arrow over a vehicle.
|
||||
*/
|
||||
bool GetPlayer3DArrowID(SQInteger id) const;
|
||||
|
||||
#endif
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* See whether the managed vehicle entity collides with user defined areas.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user