1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Expose the vehicle light data modification API.

This commit is contained in:
Sandu Liviu Catalin 2018-06-28 22:12:05 +03:00
parent 877e1a38cc
commit 88b5859213
2 changed files with 29 additions and 0 deletions

View File

@ -1098,6 +1098,24 @@ void CVehicle::ResetHandlings() const
_Func->ResetInstHandling(m_ID); _Func->ResetInstHandling(m_ID);
} }
// ------------------------------------------------------------------------------------------------
Int32 CVehicle::GetLightsData() const
{
// Validate the managed identifier
Validate();
// Retrieve the requested data
return _Func->GetVehicleLightsData(m_ID);
}
// ------------------------------------------------------------------------------------------------
void CVehicle::SetLightsData(Int32 data) const
{
// Validate the managed identifier
Validate();
// Apply the requested data
_Func->SetVehicleLightsData(m_ID, data);
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
bool CVehicle::Embark(CPlayer & player) const bool CVehicle::Embark(CPlayer & player) const
{ {
@ -1950,6 +1968,7 @@ void Register_CVehicle(HSQUIRRELVM vm)
.Prop(_SC("HorizontalTurretRotation"), &CVehicle::GetHorizontalTurretRotation) .Prop(_SC("HorizontalTurretRotation"), &CVehicle::GetHorizontalTurretRotation)
.Prop(_SC("VerTurretRotation"), &CVehicle::GetVerticalTurretRotation) .Prop(_SC("VerTurretRotation"), &CVehicle::GetVerticalTurretRotation)
.Prop(_SC("VerticalTurretRotation"), &CVehicle::GetVerticalTurretRotation) .Prop(_SC("VerticalTurretRotation"), &CVehicle::GetVerticalTurretRotation)
.Prop(_SC("LightsData"), &CVehicle::GetLightsData, &CVehicle::SetLightsData)
.Prop(_SC("CollideAreas"), &CVehicle::GetCollideAreas, &CVehicle::SetCollideAreas) .Prop(_SC("CollideAreas"), &CVehicle::GetCollideAreas, &CVehicle::SetCollideAreas)
.Prop(_SC("TrackPosition"), &CVehicle::GetTrackPosition, &CVehicle::SetTrackPosition) .Prop(_SC("TrackPosition"), &CVehicle::GetTrackPosition, &CVehicle::SetTrackPosition)
.Prop(_SC("TrackRotation"), &CVehicle::GetTrackRotation, &CVehicle::SetTrackRotation) .Prop(_SC("TrackRotation"), &CVehicle::GetTrackRotation, &CVehicle::SetTrackRotation)

View File

@ -602,6 +602,16 @@ public:
*/ */
void ResetHandlings() const; void ResetHandlings() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the lights data for the managed vehicle entity.
*/
Int32 GetLightsData() const;
/* --------------------------------------------------------------------------------------------
* Modify the lights data for the managed vehicle entity.
*/
void SetLightsData(Int32 data) const;
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------
* Embark the specified player entity into the managed vehicle entity. * Embark the specified player entity into the managed vehicle entity.
*/ */