2015-09-30 02:56:11 +02:00
|
|
|
#include "Entity/Vehicle.hpp"
|
2015-10-29 21:56:07 +01:00
|
|
|
#include "Base/Quaternion.hpp"
|
|
|
|
#include "Base/Vector4.hpp"
|
|
|
|
#include "Misc/Automobile.hpp"
|
2015-11-01 00:33:12 +01:00
|
|
|
#include "Core.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
#include "Register.hpp"
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-10-29 21:56:07 +01:00
|
|
|
CAutomobile CVehicle::s_Automobile;
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Vector3 CVehicle::s_Vector3;
|
|
|
|
Vector4 CVehicle::s_Vector4;
|
|
|
|
Quaternion CVehicle::s_Quaternion;
|
|
|
|
|
2015-11-01 00:33:12 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
CVehicle::CVehicle(const Reference< CVehicle > & o)
|
2015-11-01 00:33:12 +01:00
|
|
|
: Reference(o)
|
|
|
|
{
|
|
|
|
/* ... */
|
|
|
|
}
|
|
|
|
|
2015-10-29 21:56:07 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
bool CVehicle::IsStreamedFor(const Reference< CPlayer > & player) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && player)
|
|
|
|
{
|
|
|
|
return _Func->IsVehicleStreamedForPlayer(m_ID, player);
|
|
|
|
}
|
|
|
|
else if (!player)
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("streamed_for", "see whether is streamed for player", _SCI32(player));
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("streamed_for", "see whether is streamed for player");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetSyncSource() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleSyncSource(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@sync_source", "get synchronization source");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetSyncType() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleSyncType(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@sync_type", "get synchronization type");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetWorld() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleWorld(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@world", "get world");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetWorld(SQInt32 world) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleWorld(m_ID, world);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@world", "set world");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const CAutomobile & CVehicle::GetModel() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous model
|
|
|
|
s_Automobile.SetID(SQMOD_UNKNOWN);
|
|
|
|
// Attempt to retrieve the model
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
s_Automobile.SetID(_Func->GetVehicleModel(m_ID));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@model", "get model");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the model that could be retrieved
|
|
|
|
return s_Automobile;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetModelID() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleModel(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@model_id", "get model id");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
Reference< CPlayer > CVehicle::GetOccupant(SQInt32 slot) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return Reference< CPlayer >(_Func->GetVehicleOccupant(m_ID, slot));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("occupant", "get slot occupant");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return Reference< CPlayer >();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetOccupantID(SQInt32 slot) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleOccupant(m_ID, slot);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("occupant_id", "get slot occupant id");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::Respawn() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->RespawnVehicle(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("respawn", "respawn instance");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetImmunity() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleImmunityFlags(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@immunity", "get immunity flags");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetImmunity(SQInt32 flags) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleImmunityFlags(m_ID, flags);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@immunity", "set immunity flags");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
bool CVehicle::IsWrecked() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->IsVehicleWrecked(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@wrecked", "see whether is wrecked");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetPosition() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous position
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the position
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehiclePos(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@position", "get position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the position that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetPosition(const Vector3 & pos) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehiclePos(m_ID, pos.x, pos.y, pos.z, false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@position", "set position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetPositionEx(const Vector3 & pos, bool empty) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehiclePos(m_ID, pos.x, pos.y, pos.z, empty);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_position", "set position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehiclePos(m_ID, x, y, z, false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_position", "set position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetPositionEx(SQFloat x, SQFloat y, SQFloat z, bool empty) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehiclePos(m_ID, x, y, z, empty);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_position", "set position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Quaternion & CVehicle::GetRotation() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous rotation
|
|
|
|
s_Quaternion.Clear();
|
|
|
|
// Attempt to retrieve the rotation
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleRot(m_ID, &s_Quaternion.x, &s_Quaternion.y, &s_Quaternion.z, &s_Quaternion.w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rotation", "get rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the rotation that could be retrieved
|
|
|
|
return s_Quaternion;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRotation(const Quaternion & rot) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRot(m_ID, rot.x, rot.y, rot.z, rot.w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rotation", "set rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRot(m_ID, x, y, z, w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_rotation", "set rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetRotationEuler() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous rotation
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the rotation
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleRotEuler(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rotation_euler", "get euler rotatio");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the rotation that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRotationEuler(const Vector3 & rot) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRotEuler(m_ID, rot.x, rot.y, rot.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rotation_euler", "set euler rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRotEuler(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_rotation_euler", "set euler rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetSpeed() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous speed
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the speed
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleSpeed(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@speed", "get speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the speed that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@speed", "set speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_speed", "set speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_speed", "add to speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_speed", "add to speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetRelSpeed() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous speed
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the speed
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleRelSpeed(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rel_speed", "get relative speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the speed that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRelSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRelSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rel_speed", "set relative speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRelSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_rel_speed", "set relative speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddRelSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleRelSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_rel_speed", "add to relative speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddRelSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleRelSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_rel_speed", "add to relative speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetTurnSpeed() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous speed
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the speed
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleTurnSpeed(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@turn_speed", "get turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the speed that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetTurnSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleTurnSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@turn_speed", "set turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleTurnSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_turn_speed", "set turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddTurnSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleTurnSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_turn_speed", "add to turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleTurnSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_turn_speed", "add to turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetRelTurnSpeed() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous speed
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the speed
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleRelTurnSpeed(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rel_turn_speed", "get relative turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the speed that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRelTurnSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRelTurnSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@rel_turn_speed", "set relative turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRelTurnSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_rel_turn_speed", "set relative turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddRelTurnSpeed(const Vector3 & vel) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleRelTurnSpeed(m_ID, vel.x, vel.y, vel.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_rel_turn_speed", "add to relative turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::AddRelTurnSpeedEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->AddVehicleRelTurnSpeed(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("add_rel_turn_speed", "add to relative turn speed");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector4 & CVehicle::GetSpawnPosition() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous position
|
|
|
|
s_Vector4.Clear();
|
|
|
|
// Attempt to retrieve the position
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleSpawnPos(m_ID, &s_Vector4.x, &s_Vector4.y, &s_Vector4.z, &s_Vector4.w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@spawn_position", "get spawn position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the position that could be retrieved
|
|
|
|
return s_Vector4;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpawnPosition(const Vector4 & pos) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpawnPos(m_ID, pos.x, pos.y, pos.z, pos.w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@spawn_position", "set spawn position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpawnPositionEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpawnPos(m_ID, x, y, z, w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_spawn_position", "set spawn position");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Quaternion & CVehicle::GetSpawnRotation() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous rotation
|
|
|
|
s_Quaternion.Clear();
|
|
|
|
// Attempt to retrieve the rotation
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleSpawnRot(m_ID, &s_Quaternion.x, &s_Quaternion.y, &s_Quaternion.z, &s_Quaternion.w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@spawn_rotation", "get spawn rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the rotation that could be retrieved
|
|
|
|
return s_Quaternion;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpawnRotation(const Quaternion & rot) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpawnRot(m_ID, rot.x, rot.y, rot.z, rot.w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@spawn_rotation", "set spawn rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpawnRotationEx(SQFloat x, SQFloat y, SQFloat z, SQFloat w) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpawnRot(m_ID, x, y, z, w);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_spawn_rotation", "set spawn rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CVehicle::GetSpawnRotationEuler() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
// Clear any previous rotation
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Attempt to retrieve the rotation
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->GetVehicleSpawnRotEuler(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@spawn_rotation_euler", "get spawn euler rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
// Return the rotation that could be retrieved
|
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpawnRotationEuler(const Vector3 & rot) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpawnRotEuler(m_ID, rot.x, rot.y, rot.z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@spawn_rotation_euler", "set spawn euler rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSpawnRotationEulerEx(SQFloat x, SQFloat y, SQFloat z) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleSpawnRotEuler(m_ID, x, y, z);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_spawn_rotation_euler", "set spawn euler rotation");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQUint32 CVehicle::GetRespawnTimer() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleIdleRespawnTimer(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@respawn_timer", "get respawn timer");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_BLANK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRespawnTimer(SQUint32 timer) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleIdleRespawnTimer(m_ID, timer);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@respawn_timer", "set respawn timer");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat CVehicle::GetHealth() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleHealth(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@health", "get health");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetHealth(SQFloat amount) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleHealth(m_ID, amount);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@health", "set health");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetPrimaryColor() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
SQInt32 primary;
|
|
|
|
_Func->GetVehicleColour(m_ID, &primary, NULL);
|
|
|
|
return primary;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@primary_color", "get primary color");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetPrimaryColor(SQInt32 col) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && VALID_VEHCOL(col))
|
|
|
|
{
|
|
|
|
SQInt32 secondary;
|
|
|
|
_Func->GetVehicleColour(m_ID, NULL, &secondary);
|
|
|
|
_Func->SetVehicleColour(m_ID, col, secondary);
|
|
|
|
}
|
|
|
|
else if (!VALID_VEHCOL(col))
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("@primary_color", "set primary color", col);
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@primary_color", "set primary color");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetSecondaryColor() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
SQInt32 secondary;
|
|
|
|
_Func->GetVehicleColour(m_ID, NULL, &secondary);
|
|
|
|
return secondary;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@secondary_color", "get secondary color");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetSecondaryColor(SQInt32 col) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && VALID_VEHCOL(col))
|
|
|
|
{
|
|
|
|
SQInt32 primary;
|
|
|
|
_Func->GetVehicleColour(m_ID, &primary, NULL);
|
|
|
|
_Func->SetVehicleColour(m_ID, primary, col);
|
|
|
|
}
|
|
|
|
else if (!VALID_VEHCOL(col))
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("@secondary_color", "set secondary color", col);
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@secondary_color", "set secondary color");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetColors(SQInt32 primary, SQInt32 secondary) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && VALID_VEHCOL(primary) && VALID_VEHCOL(secondary))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleColour(m_ID, primary, secondary);
|
|
|
|
}
|
|
|
|
else if (!VALID_VEHCOL(primary) || !VALID_VEHCOL(secondary))
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("set_colors", "set vehicle colors", primary, secondary);
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_colors", "set vehicle colors");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-11 09:56:02 +01:00
|
|
|
bool CVehicle::GetLocked() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleDoorsLocked(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@locked", "see whether is locked");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetLocked(bool toggle) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleDoorsLocked(m_ID, toggle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@locked", "set whether is locked");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetPartStatus(SQInt32 part) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehiclePartStatus(m_ID, part);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("get_part_status", "get part status");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetPartStatus(SQInt32 part, SQInt32 status) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehiclePartStatus(m_ID, part, status);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_part_status", "set part status");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetTyreStatus(SQInt32 tyre) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleTyreStatus(m_ID, tyre);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("get_tyre_status", "get tyre status");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetTyreStatus(SQInt32 tyre, SQInt32 status) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleTyreStatus(m_ID, tyre, status);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_tyre_status", "set tyre status");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQUint32 CVehicle::GetDamageData() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleDamageData(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@damage_data", "get damage data");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_BLANK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetDamageData(SQUint32 data) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleDamageData(m_ID, data);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@damage_data", "get damage data");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-11 09:56:02 +01:00
|
|
|
bool CVehicle::GetAlarm() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleAlarm(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@alarm", "see whether has alarm");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetAlarm(bool toggle) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleAlarm(m_ID, toggle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@alarm", "set whether has alarm");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-11 09:56:02 +01:00
|
|
|
bool CVehicle::GetLights() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleLights(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@lights", "see whether has lights");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetLights(bool toggle) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleLights(m_ID, toggle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@lights", "set whether has lights");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 CVehicle::GetRadio() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleRadio(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@radio", "get radio");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRadio(SQInt32 radio) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && VALID_ENTITY(radio))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRadio(m_ID, radio);
|
|
|
|
}
|
|
|
|
else if (INVALID_ENTITY(radio))
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("@radio", "set radio", radio);
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@radio", "set radio");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-11 09:56:02 +01:00
|
|
|
bool CVehicle::GetRadioLocked() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->IsVehicleRadioLocked(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@radio_locked", "see whether radio is locked");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetRadioLocked(bool toggle) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleRadioLocked(m_ID, toggle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@radio_locked", "set whether radio is locked");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-11 09:56:02 +01:00
|
|
|
bool CVehicle::GetGhostState() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetVehicleGhostState(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@ghost_state", "see whether is in ghost state");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetGhostState(bool toggle) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetVehicleGhostState(m_ID, toggle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("@ghost_state", "set whether is in ghost state");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::ResetHandling() const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->ResetInstHandling(m_ID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("reset_handling", "reset all handling rules");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::ResetHandling(SQInt32 rule) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->ResetInstHandlingRule(m_ID, rule);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("reset_handling", "reset a handling rule");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
bool CVehicle::ExistsHandling(SQInt32 rule) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->ExistsInstHandlingRule(m_ID, rule);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("exists_handling", "see whether handling rule exists");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat CVehicle::GetHandlingData(SQInt32 rule) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
return _Func->GetInstHandlingRule(m_ID, rule);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("get_handling_data", "get handling data");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return SQMOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::SetHandlingData(SQInt32 rule, SQFloat data) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID))
|
|
|
|
{
|
|
|
|
_Func->SetInstHandlingRule(m_ID, rule, data);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("set_handling_data", "set handling data");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::Embark(const Reference< CPlayer > & player) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && player)
|
|
|
|
{
|
|
|
|
_Func->PutPlayerInVehicle(player, m_ID, 0, true, true);
|
|
|
|
}
|
|
|
|
else if (!player)
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("embark", "embark player", _SCI32(player));
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("embark", "embark player");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CVehicle::Embark(const Reference< CPlayer > & player, SQInt32 slot, bool allocate, bool warp) const
|
2015-10-29 21:56:07 +01:00
|
|
|
{
|
|
|
|
if (VALID_ENTITY(m_ID) && player)
|
|
|
|
{
|
|
|
|
_Func->PutPlayerInVehicle(player, m_ID, slot, allocate, warp);
|
|
|
|
}
|
|
|
|
else if (!player)
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadArg("embark", "embark player", _SCI32(player));
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-11 10:30:50 +01:00
|
|
|
BadRef("embark", "embark player");
|
2015-10-29 21:56:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-01 00:33:12 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_PEF(SQInt32 model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_PEF(SQInt32 model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
|
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_EF(const CAutomobile & model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_EF(const CAutomobile & model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_CF(const CAutomobile & model, SQInt32 world,
|
|
|
|
const Vector3 & pos, SQFloat angle,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< CVehicle > CreateBaseVehicle_CF(const CAutomobile & model, SQInt32 world,
|
|
|
|
const Vector3 & pos, SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
CVehicle CreateVehicle_PEF(SQInt32 model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
CVehicle CreateVehicle_PEF(SQInt32 model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
CVehicle CreateVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
CVehicle CreateVehicle_PCF(SQInt32 model, SQInt32 world, const Vector3 & pos,
|
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
CVehicle CreateVehicle_EF(const CAutomobile & model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
CVehicle CreateVehicle_EF(const CAutomobile & model, SQInt32 world,
|
|
|
|
SQFloat x, SQFloat y, SQFloat z,
|
|
|
|
SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
CVehicle CreateVehicle_CF(const CAutomobile & model, SQInt32 world,
|
|
|
|
const Vector3 & pos, SQFloat angle,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 primary, SQInt32 secondary)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
SQMOD_CREATE_DEFAULT, NullData());
|
|
|
|
}
|
|
|
|
|
|
|
|
CVehicle CreateVehicle_CF(const CAutomobile & model, SQInt32 world,
|
|
|
|
const Vector3 & pos, SQFloat angle, SQInt32 primary, SQInt32 secondary,
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInt32 header, SqObj & payload)
|
2015-11-01 00:33:12 +01:00
|
|
|
{
|
|
|
|
return _Core->NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
|
|
|
header, payload);
|
|
|
|
}
|
|
|
|
|
2015-10-29 21:56:07 +01:00
|
|
|
// ================================================================================================
|
2015-09-30 02:56:11 +02:00
|
|
|
bool Register_CVehicle(HSQUIRRELVM vm)
|
|
|
|
{
|
2015-10-29 21:56:07 +01:00
|
|
|
// Attempt to register the base reference type before the actual implementation
|
2015-09-30 02:56:11 +02:00
|
|
|
if (!Register_Reference< CVehicle >(vm, _SC("BaseVehicle")))
|
|
|
|
{
|
2015-10-29 21:56:07 +01:00
|
|
|
LogFtl("Unable to register the base class <BaseVehicle> for <CVehicle> type");
|
|
|
|
// Registration failed
|
2015-09-30 02:56:11 +02:00
|
|
|
return false;
|
|
|
|
}
|
2015-11-01 00:33:12 +01:00
|
|
|
// Typedef the base reference type for simplicity
|
|
|
|
typedef Reference< CVehicle > RefType;
|
2015-10-29 21:56:07 +01:00
|
|
|
// Output debugging information
|
2015-09-30 02:56:11 +02:00
|
|
|
LogDbg("Beginning registration of <CVehicle> type");
|
2015-10-29 21:56:07 +01:00
|
|
|
// Attempt to register the actual reference that implements all of the entity functionality
|
2015-11-01 00:33:12 +01:00
|
|
|
Sqrat::RootTable(vm).Bind(_SC("CVehicle"), Sqrat::DerivedClass< CVehicle, RefType >(vm, _SC("CVehicle"))
|
2015-11-11 09:56:02 +01:00
|
|
|
/* Constructors */
|
2015-09-30 02:56:11 +02:00
|
|
|
.Ctor()
|
|
|
|
.Ctor< SQInt32 >()
|
2015-11-11 09:56:02 +01:00
|
|
|
/* Properties */
|
|
|
|
.Prop(_SC("sync_source"), &CVehicle::GetSyncSource)
|
|
|
|
.Prop(_SC("sync_type"), &CVehicle::GetSyncType)
|
|
|
|
.Prop(_SC("world"), &CVehicle::GetWorld, &CVehicle::SetWorld)
|
|
|
|
.Prop(_SC("model"), &CVehicle::GetModel)
|
|
|
|
.Prop(_SC("model_id"), &CVehicle::GetModelID)
|
|
|
|
.Prop(_SC("immunity"), &CVehicle::GetImmunity, &CVehicle::SetImmunity)
|
|
|
|
.Prop(_SC("wrecked"), &CVehicle::IsWrecked)
|
|
|
|
.Prop(_SC("position"), &CVehicle::GetPosition, &CVehicle::SetPosition)
|
|
|
|
.Prop(_SC("rotation"), &CVehicle::GetRotation, &CVehicle::SetRotation)
|
|
|
|
.Prop(_SC("rotation_euler"), &CVehicle::GetRotationEuler, &CVehicle::SetRotationEuler)
|
|
|
|
.Prop(_SC("speed"), &CVehicle::GetSpeed, &CVehicle::SetSpeed)
|
|
|
|
.Prop(_SC("rel_speed"), &CVehicle::GetRelSpeed, &CVehicle::SetRelSpeed)
|
|
|
|
.Prop(_SC("turn_speed"), &CVehicle::GetTurnSpeed, &CVehicle::SetTurnSpeed)
|
|
|
|
.Prop(_SC("rel_turn_speed"), &CVehicle::GetRelTurnSpeed, &CVehicle::SetRelTurnSpeed)
|
|
|
|
.Prop(_SC("spawn_position"), &CVehicle::GetSpawnPosition, &CVehicle::SetSpawnPosition)
|
|
|
|
.Prop(_SC("spawn_rotation"), &CVehicle::GetSpawnRotation, &CVehicle::SetSpawnRotation)
|
|
|
|
.Prop(_SC("spawn_rotation_euler"), &CVehicle::GetSpawnRotationEuler, &CVehicle::SetSpawnRotationEuler)
|
|
|
|
.Prop(_SC("respawn_timer"), &CVehicle::GetRespawnTimer, &CVehicle::SetRespawnTimer)
|
|
|
|
.Prop(_SC("health"), &CVehicle::GetHealth, &CVehicle::SetHealth)
|
|
|
|
.Prop(_SC("primary_color"), &CVehicle::GetPrimaryColor, &CVehicle::SetPrimaryColor)
|
|
|
|
.Prop(_SC("secondary_color"), &CVehicle::GetSecondaryColor, &CVehicle::SetSecondaryColor)
|
|
|
|
.Prop(_SC("locked"), &CVehicle::GetLocked, &CVehicle::SetLocked)
|
|
|
|
.Prop(_SC("damage_data"), &CVehicle::GetDamageData, &CVehicle::SetDamageData)
|
|
|
|
.Prop(_SC("alarm"), &CVehicle::GetAlarm, &CVehicle::SetAlarm)
|
|
|
|
.Prop(_SC("lights"), &CVehicle::GetLights, &CVehicle::SetLights)
|
|
|
|
.Prop(_SC("radio"), &CVehicle::GetRadio, &CVehicle::SetRadio)
|
|
|
|
.Prop(_SC("radio_locked"), &CVehicle::GetRadioLocked, &CVehicle::SetRadioLocked)
|
|
|
|
.Prop(_SC("ghost_state"), &CVehicle::GetGhostState, &CVehicle::SetGhostState)
|
|
|
|
/* Functions */
|
|
|
|
.Func(_SC("streamed_for"), &CVehicle::IsStreamedFor)
|
|
|
|
.Func(_SC("occupant"), &CVehicle::GetOccupant)
|
|
|
|
.Func(_SC("occupant_id"), &CVehicle::GetOccupantID)
|
|
|
|
.Func(_SC("respawn"), &CVehicle::Respawn)
|
|
|
|
.Func(_SC("set_rotation"), &CVehicle::SetRotationEx)
|
|
|
|
.Func(_SC("set_rotation_euler"), &CVehicle::SetRotationEulerEx)
|
|
|
|
.Func(_SC("set_speed"), &CVehicle::SetSpeedEx)
|
|
|
|
.Func(_SC("set_rel_speed"), &CVehicle::SetRelSpeedEx)
|
|
|
|
.Func(_SC("set_turn_speed"), &CVehicle::SetTurnSpeedEx)
|
|
|
|
.Func(_SC("set_rel_turn_speed"), &CVehicle::SetRelTurnSpeedEx)
|
|
|
|
.Func(_SC("set_spawn_position"), &CVehicle::SetSpawnPositionEx)
|
|
|
|
.Func(_SC("set_spawn_rotation"), &CVehicle::SetSpawnRotationEx)
|
|
|
|
.Func(_SC("set_spawn_rotation_euler"), &CVehicle::SetSpawnRotationEulerEx)
|
|
|
|
.Func(_SC("set_colors"), &CVehicle::SetColors)
|
|
|
|
.Func(_SC("get_part_status"), &CVehicle::GetPartStatus)
|
|
|
|
.Func(_SC("set_part_status"), &CVehicle::SetPartStatus)
|
|
|
|
.Func(_SC("get_tyre_status"), &CVehicle::GetTyreStatus)
|
|
|
|
.Func(_SC("set_tyre_status"), &CVehicle::SetTyreStatus)
|
|
|
|
.Func(_SC("exists_handling"), &CVehicle::ExistsHandling)
|
|
|
|
.Func(_SC("get_handling_data"), &CVehicle::GetHandlingData)
|
|
|
|
.Func(_SC("set_handling_data"), &CVehicle::SetHandlingData)
|
|
|
|
/* Overloads */
|
|
|
|
.Overload< void (CVehicle::*)(const Vector3 &, bool) const >
|
|
|
|
(_SC("set_position"), &CVehicle::SetPositionEx)
|
|
|
|
.Overload< void (CVehicle::*)(SQFloat, SQFloat, SQFloat) const >
|
|
|
|
(_SC("set_position"), &CVehicle::SetPositionEx)
|
|
|
|
.Overload< void (CVehicle::*)(SQFloat, SQFloat, SQFloat, bool) const >
|
|
|
|
(_SC("set_position"), &CVehicle::SetPositionEx)
|
|
|
|
.Overload< void (CVehicle::*)(const Vector3 &) const >
|
|
|
|
(_SC("add_speed"), &CVehicle::AddSpeed)
|
|
|
|
.Overload< void (CVehicle::*)(SQFloat, SQFloat, SQFloat) const >
|
|
|
|
(_SC("add_speed"), &CVehicle::AddSpeedEx)
|
|
|
|
.Overload< void (CVehicle::*)(const Vector3 &) const >
|
|
|
|
(_SC("add_rel_speed"), &CVehicle::AddRelSpeed)
|
|
|
|
.Overload< void (CVehicle::*)(SQFloat, SQFloat, SQFloat) const >
|
|
|
|
(_SC("add_rel_speed"), &CVehicle::AddRelSpeedEx)
|
|
|
|
.Overload< void (CVehicle::*)(const Vector3 &) const >
|
|
|
|
(_SC("add_turn_speed"), &CVehicle::AddTurnSpeed)
|
|
|
|
.Overload< void (CVehicle::*)(SQFloat, SQFloat, SQFloat) const >
|
|
|
|
(_SC("add_turn_speed"), &CVehicle::AddTurnSpeedEx)
|
|
|
|
.Overload< void (CVehicle::*)(const Vector3 &) const >
|
|
|
|
(_SC("add_rel_turn_speed"), &CVehicle::AddRelTurnSpeed)
|
|
|
|
.Overload< void (CVehicle::*)(SQFloat, SQFloat, SQFloat) const >
|
|
|
|
(_SC("add_rel_turn_speed"), &CVehicle::AddRelTurnSpeedEx)
|
|
|
|
.Overload< void (CVehicle::*)(void) const >
|
|
|
|
(_SC("reset_handling"), &CVehicle::ResetHandling)
|
|
|
|
.Overload< void (CVehicle::*)(SQInt32) const >
|
|
|
|
(_SC("reset_handling"), &CVehicle::ResetHandling)
|
|
|
|
.Overload< void (CVehicle::*)(const Reference< CPlayer > &) const >
|
|
|
|
(_SC("embark"), &CVehicle::Embark)
|
|
|
|
.Overload< void (CVehicle::*)(const Reference< CPlayer > &, SQInt32, bool, bool) const >
|
|
|
|
(_SC("embark"), &CVehicle::Embark)
|
2015-09-30 02:56:11 +02:00
|
|
|
);
|
2015-10-29 21:56:07 +01:00
|
|
|
// Output debugging information
|
2015-09-30 02:56:11 +02:00
|
|
|
LogDbg("Registration of <CVehicle> type was successful");
|
2015-11-01 00:33:12 +01:00
|
|
|
// Output debugging information
|
2015-11-11 09:56:02 +01:00
|
|
|
LogDbg("Beginning registration of <Vehicle> functions");
|
2015-11-01 00:33:12 +01:00
|
|
|
// Register global functions related to this entity type
|
|
|
|
Sqrat::RootTable(vm)
|
|
|
|
/* Create BaseVehicle [P]rimitive [E]xtended [F]Full */
|
|
|
|
.Overload< RefType (*)(SQInt32, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateBaseVehicle_PEF"), &CreateBaseVehicle_PEF)
|
|
|
|
.Overload< RefType (*)(SQInt32, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateBaseVehicle_PEF"), &CreateBaseVehicle_PEF)
|
|
|
|
/* Create BaseVehicle [P]rimitive [C]ompact [F]ull */
|
|
|
|
.Overload< RefType (*)(SQInt32, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateBaseVehicle_PCF"), &CreateBaseVehicle_PCF)
|
|
|
|
.Overload< RefType (*)(SQInt32, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateBaseVehicle_PCF"), &CreateBaseVehicle_PCF)
|
|
|
|
/* Create BaseVehicle [E]xtended [F]Full */
|
|
|
|
.Overload< RefType (*)(const CAutomobile &, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateBaseVehicle_EF"), &CreateBaseVehicle_EF)
|
|
|
|
.Overload< RefType (*)(const CAutomobile &, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateBaseVehicle_EF"), &CreateBaseVehicle_EF)
|
|
|
|
/* Create BaseVehicle [C]ompact [F]ull */
|
|
|
|
.Overload< RefType (*)(const CAutomobile &, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateBaseVehicle_CF"), &CreateBaseVehicle_CF)
|
|
|
|
.Overload< RefType (*)(const CAutomobile &, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateBaseVehicle_CF"), &CreateBaseVehicle_CF)
|
|
|
|
/* Create CVehicle [P]rimitive [E]xtended [F]Full */
|
|
|
|
.Overload< CVehicle (*)(SQInt32, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateVehicle_PEF"), &CreateVehicle_PEF)
|
|
|
|
.Overload< CVehicle (*)(SQInt32, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateVehicle_PEF"), &CreateVehicle_PEF)
|
|
|
|
/* Create CVehicle [P]rimitive [C]ompact [F]ull */
|
|
|
|
.Overload< CVehicle (*)(SQInt32, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateVehicle_PCF"), &CreateVehicle_PCF)
|
|
|
|
.Overload< CVehicle (*)(SQInt32, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateVehicle_PCF"), &CreateVehicle_PCF)
|
|
|
|
/* Create CVehicle [E]xtended [F]Full */
|
|
|
|
.Overload< CVehicle (*)(const CAutomobile &, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateVehicle_EF"), &CreateVehicle_EF)
|
|
|
|
.Overload< CVehicle (*)(const CAutomobile &, SQInt32, SQFloat, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateVehicle_EF"), &CreateVehicle_EF)
|
|
|
|
/* Create CVehicle [C]ompact [F]ull */
|
|
|
|
.Overload< CVehicle (*)(const CAutomobile &, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32) >
|
|
|
|
(_SC("CreateVehicle_CF"), &CreateVehicle_CF)
|
|
|
|
.Overload< CVehicle (*)(const CAutomobile &, SQInt32, const Vector3 &, SQFloat, SQInt32, SQInt32, SQInt32, SqObj &) >
|
|
|
|
(_SC("CreateVehicle_CF"), &CreateVehicle_CF);
|
|
|
|
// Output debugging information
|
2015-11-11 09:56:02 +01:00
|
|
|
LogDbg("Registration of <Vehicle> functions was successful");
|
2015-10-29 21:56:07 +01:00
|
|
|
// Registration succeeded
|
2015-09-30 02:56:11 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|