mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-15 22:57:12 +02:00
Return entity instance instead of object.
Implement helper entity iteration functions.
This commit is contained in:
@ -223,7 +223,7 @@ static LightObj & Blip_CreateEx1a(int32_t world, float x, float y, float z, int3
|
||||
uint8_t r, uint8_t g, uint8_t b, uint8_t a, int32_t spr_id)
|
||||
{
|
||||
return Core::Get().NewBlip(-1, world, x, y, z, scale, SQMOD_PACK_RGBA(r, g, b, a), spr_id, // NOLINT(hicpp-signed-bitwise)
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Blip_CreateEx1b(int32_t world, float x, float y, float z, int32_t scale,
|
||||
@ -231,7 +231,7 @@ static LightObj & Blip_CreateEx1b(int32_t world, float x, float y, float z, int3
|
||||
int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewBlip(-1, world, x, y, z, scale, SQMOD_PACK_RGBA(r, g, b, a), spr_id, // NOLINT(hicpp-signed-bitwise)
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -239,7 +239,7 @@ static LightObj & Blip_CreateEx2a(int32_t index, int32_t world, float x, float y
|
||||
int32_t scale, uint8_t r, uint8_t g, uint8_t b, uint8_t a, int32_t spr_id)
|
||||
{
|
||||
return Core::Get().NewBlip(index, world, x, y, z, scale, SQMOD_PACK_RGBA(r, g, b, a), spr_id, // NOLINT(hicpp-signed-bitwise)
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Blip_CreateEx2b(int32_t index, int32_t world, float x, float y, float z, int32_t scale,
|
||||
@ -247,7 +247,7 @@ static LightObj & Blip_CreateEx2b(int32_t index, int32_t world, float x, float y
|
||||
int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewBlip(index, world, x, y, z, scale, SQMOD_PACK_RGBA(r, g, b, a), spr_id, // NOLINT(hicpp-signed-bitwise)
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -255,14 +255,14 @@ static LightObj & Blip_Create1a(int32_t world, const Vector3 & pos, int32_t scal
|
||||
int32_t spr_id)
|
||||
{
|
||||
return Core::Get().NewBlip(-1, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), spr_id,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Blip_Create1b(int32_t world, const Vector3 & pos, int32_t scale, const Color4 & color,
|
||||
int32_t spr_id, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewBlip(-1, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), spr_id,
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -270,14 +270,14 @@ static LightObj & Blip_Create2a(int32_t index, int32_t world, const Vector3 & po
|
||||
const Color4 & color, int32_t spr_id)
|
||||
{
|
||||
return Core::Get().NewBlip(index, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), spr_id,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Blip_Create2b(int32_t index, int32_t world, const Vector3 & pos, int32_t scale,
|
||||
const Color4 & color, int32_t spr_id, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewBlip(index, world, pos.x, pos.y, pos.z, scale, color.GetRGBA(), spr_id,
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
@ -474,7 +474,7 @@ static LightObj & Checkpoint_CreateEx1a(int32_t world, bool sphere, float x, flo
|
||||
uint8_t r, uint8_t g, uint8_t b, uint8_t a, float radius)
|
||||
{
|
||||
return Core::Get().NewCheckpoint(-1, world, sphere, x, y, z, r, g, b, a, radius,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Checkpoint_CreateEx1b(int32_t world, bool sphere, float x, float y, float z,
|
||||
@ -482,7 +482,7 @@ static LightObj & Checkpoint_CreateEx1b(int32_t world, bool sphere, float x, flo
|
||||
int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewCheckpoint(-1, world, sphere, x, y, z, r, g, b, a,
|
||||
radius, header, payload);
|
||||
radius, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -491,14 +491,14 @@ static LightObj & Checkpoint_Create1a(int32_t world, bool sphere, const Vector3
|
||||
{
|
||||
return Core::Get().NewCheckpoint(-1, world, sphere, pos.x, pos.y, pos.z,
|
||||
color.r, color.g, color.b, color.a, radius,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Checkpoint_Create1b(int32_t world, bool sphere, const Vector3 & pos,
|
||||
const Color4 & color, float radius, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewCheckpoint(-1, world, sphere, pos.x, pos.y, pos.z,
|
||||
color.r, color.g, color.b, color.a, radius, header, payload);
|
||||
color.r, color.g, color.b, color.a, radius, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
@ -151,26 +151,26 @@ static LightObj & KeyBind_CreateEx1a(int32_t slot, bool release, int32_t primary
|
||||
int32_t alternative)
|
||||
{
|
||||
return Core::Get().NewKeyBind(slot, release, primary, secondary, alternative,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & KeyBind_CreateEx1b(int32_t slot, bool release, int32_t primary, int32_t secondary,
|
||||
int32_t alternative, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewKeyBind(slot, release, primary, secondary, alternative, header, payload);
|
||||
return Core::Get().NewKeyBind(slot, release, primary, secondary, alternative, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static LightObj & KeyBind_Create1a(bool release, int32_t primary, int32_t secondary, int32_t alternative)
|
||||
{
|
||||
return Core::Get().NewKeyBind(-1, release, primary, secondary, alternative,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & KeyBind_Create1b(bool release, int32_t primary, int32_t secondary, int32_t alternative,
|
||||
int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewKeyBind(-1, release, primary, secondary, alternative, header, payload);
|
||||
return Core::Get().NewKeyBind(-1, release, primary, secondary, alternative, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -838,26 +838,26 @@ void CObject::RotateByEulerZ(float z) const
|
||||
static LightObj & Object_CreateEx1a(int32_t model, int32_t world, float x, float y, float z,
|
||||
int32_t alpha)
|
||||
{
|
||||
return Core::Get().NewObject(model, world, x, y, z, alpha, SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
return Core::Get().NewObject(model, world, x, y, z, alpha, SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Object_CreateEx1b(int32_t model, int32_t world, float x, float y, float z,
|
||||
int32_t alpha, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewObject(model, world, x, y, z, alpha, header, payload);
|
||||
return Core::Get().NewObject(model, world, x, y, z, alpha, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static LightObj & Object_Create1a(int32_t model, int32_t world, const Vector3 & pos, int32_t alpha)
|
||||
{
|
||||
return Core::Get().NewObject(model, world, pos.x, pos.y, pos.z, alpha,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Object_Create1b(int32_t model, int32_t world, const Vector3 & pos, int32_t alpha,
|
||||
int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewObject(model, world, pos.x, pos.y, pos.z, alpha, header, payload);
|
||||
return Core::Get().NewObject(model, world, pos.x, pos.y, pos.z, alpha, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
@ -453,14 +453,14 @@ static LightObj & Pickup_CreateEx1a(int32_t model, int32_t world, int32_t quanti
|
||||
float x, float y, float z, int32_t alpha, bool automatic)
|
||||
{
|
||||
return Core::Get().NewPickup(model, world, quantity, x, y, z, alpha, automatic,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Pickup_CreateEx1b(int32_t model, int32_t world, int32_t quantity,
|
||||
float x, float y, float z, int32_t alpha, bool automatic,
|
||||
int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewPickup(model, world, quantity, x, y, z, alpha, automatic, header, payload);
|
||||
return Core::Get().NewPickup(model, world, quantity, x, y, z, alpha, automatic, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -468,14 +468,14 @@ static LightObj & Pickup_Create1a(int32_t model, int32_t world, int32_t quantity
|
||||
int32_t alpha, bool automatic)
|
||||
{
|
||||
return Core::Get().NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Pickup_Create1b(int32_t model, int32_t world, int32_t quantity, const Vector3 & pos,
|
||||
int32_t alpha, bool automatic, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewPickup(model, world, quantity, pos.x, pos.y, pos.z, alpha, automatic,
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
@ -1527,7 +1527,7 @@ LightObj & CPlayer::CreateCheckpointEx1a(int32_t world, bool sphere, float x, fl
|
||||
Validate();
|
||||
// Perform the requested operation
|
||||
return Core::Get().NewCheckpoint(m_ID, world, sphere, x, y, z, r, g, b, a, radius,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -1539,7 +1539,7 @@ LightObj & CPlayer::CreateCheckpointEx1b(int32_t world, bool sphere, float x, fl
|
||||
Validate();
|
||||
// Perform the requested operation
|
||||
return Core::Get().NewCheckpoint(m_ID, world, sphere, x, y, z, r, g, b, a,
|
||||
radius, header, payload);
|
||||
radius, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -1551,7 +1551,7 @@ LightObj & CPlayer::CreateCheckpoint1a(int32_t world, bool sphere, const Vector3
|
||||
// Perform the requested operation
|
||||
return Core::Get().NewCheckpoint(m_ID, world, sphere, pos.x, pos.y, pos.z,
|
||||
color.r, color.g, color.b, color.a, radius,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -1562,7 +1562,7 @@ LightObj & CPlayer::CreateCheckpoint1b(int32_t world, bool sphere, const Vector3
|
||||
Validate();
|
||||
// Perform the requested operation
|
||||
return Core::Get().NewCheckpoint(m_ID, world, sphere, pos.x, pos.y, pos.z,
|
||||
color.r, color.g, color.b, color.a, radius, header, payload);
|
||||
color.r, color.g, color.b, color.a, radius, header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -1993,14 +1993,14 @@ static LightObj & Vehicle_CreateEx1a(int32_t model, int32_t world, float x, floa
|
||||
int32_t primary, int32_t secondary)
|
||||
{
|
||||
return Core::Get().NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Vehicle_CreateEx1b(int32_t model, int32_t world, float x, float y, float z, float angle,
|
||||
int32_t primary, int32_t secondary, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewVehicle(model, world, x, y, z, angle, primary, secondary,
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -2008,14 +2008,14 @@ static LightObj & Vehicle_Create1a(int32_t model, int32_t world, const Vector3 &
|
||||
int32_t primary, int32_t secondary)
|
||||
{
|
||||
return Core::Get().NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj());
|
||||
SQMOD_CREATE_DEFAULT, NullLightObj()).mObj;
|
||||
}
|
||||
|
||||
static LightObj & Vehicle_Create1b(int32_t model, int32_t world, const Vector3 & pos, float angle,
|
||||
int32_t primary, int32_t secondary, int32_t header, LightObj & payload)
|
||||
{
|
||||
return Core::Get().NewVehicle(model, world, pos.x, pos.y, pos.z, angle, primary, secondary,
|
||||
header, payload);
|
||||
header, payload).mObj;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
Reference in New Issue
Block a user