mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Implement the option to specify how many times you want to allow intensive entity events to be forwarded to script callbacks.
Also expose several properties for the vehicle entity type that I forgot about.
This commit is contained in:
@ -984,6 +984,87 @@ bool CVehicle::Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) co
|
||||
!= vcmpErrorRequestDenied);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger CVehicle::GetTrackPosition() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mTrackPosition;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::SetTrackPosition(SQInteger num) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Assign the requested information
|
||||
Core::Get().GetVehicle(m_ID).mTrackPosition = num;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger CVehicle::GetTrackRotation() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mTrackRotation;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::SetTrackRotation(SQInteger num) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Assign the requested information
|
||||
Core::Get().GetVehicle(m_ID).mTrackRotation = num;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CVehicle::GetLastPrimaryColour() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mLastPrimaryColour;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CVehicle::GetLastSecondaryColour() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mLastSecondaryColour;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Float32 CVehicle::GetLastHealth() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mLastHealth;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const Vector3 & CVehicle::GetLastPosition() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mLastPosition;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const Quaternion & CVehicle::GetLastRotation() const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return Core::Get().GetVehicle(m_ID).mLastRotation;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Float32 CVehicle::GetPositionX() const
|
||||
{
|
||||
@ -1678,6 +1759,13 @@ void Register_CVehicle(HSQUIRRELVM vm)
|
||||
.Prop(_SC("HorizontalTurretRotation"), &CVehicle::GetHorizontalTurretRotation)
|
||||
.Prop(_SC("VerTurretRotation"), &CVehicle::GetVerticalTurretRotation)
|
||||
.Prop(_SC("VerticalTurretRotation"), &CVehicle::GetVerticalTurretRotation)
|
||||
.Prop(_SC("TrackPosition"), &CVehicle::GetTrackPosition, &CVehicle::SetTrackPosition)
|
||||
.Prop(_SC("TrackRotation"), &CVehicle::GetTrackRotation, &CVehicle::SetTrackRotation)
|
||||
.Prop(_SC("LastPrimaryColour"), &CVehicle::GetLastPrimaryColour)
|
||||
.Prop(_SC("LastSecondaryColour"), &CVehicle::GetLastSecondaryColour)
|
||||
.Prop(_SC("LastHealth"), &CVehicle::GetLastHealth)
|
||||
.Prop(_SC("LastPosition"), &CVehicle::GetLastPosition)
|
||||
.Prop(_SC("LastRotation"), &CVehicle::GetLastRotation)
|
||||
.Prop(_SC("PosX"), &CVehicle::GetPositionX, &CVehicle::SetPositionX)
|
||||
.Prop(_SC("PosY"), &CVehicle::GetPositionY, &CVehicle::SetPositionY)
|
||||
.Prop(_SC("PosZ"), &CVehicle::GetPositionZ, &CVehicle::SetPositionZ)
|
||||
|
Reference in New Issue
Block a user