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

Make the payload non-const in CModel type.

This commit is contained in:
Sandu Liviu Catalin 2015-10-12 00:25:03 +03:00
parent cd512e1335
commit 92f449efc6
2 changed files with 12 additions and 12 deletions

View File

@ -224,26 +224,26 @@ bool CModel::IsActuallyWeapon() const noexcept
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
Reference< CObject > CModel::Object(SQInt32 world, const Vector3 & pos, SQInt32 alpha, SQInt32 header, \ Reference< CObject > CModel::Object(SQInt32 world, const Vector3 & pos, SQInt32 alpha, SQInt32 header, \
const SqObj & payload) const noexcept SqObj & payload) const noexcept
{ {
return _Core->CreateObject(*this, world, pos, alpha, header, payload); return _Core->CreateObject(*this, world, pos, alpha, header, payload);
} }
Reference< CObject > CModel::Object(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, \ Reference< CObject > CModel::Object(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, \
SQInt32 header, const SqObj & payload) const noexcept SQInt32 header, SqObj & payload) const noexcept
{ {
return _Core->CreateObject(*this, world, Vector3(x, y, z), alpha, header, payload); return _Core->CreateObject(*this, world, Vector3(x, y, z), alpha, header, payload);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
Reference< CPickup > CModel::Pickup(SQInt32 world, SQInt32 quantity, const Vector3 & pos, SQInt32 alpha, \ Reference< CPickup > CModel::Pickup(SQInt32 world, SQInt32 quantity, const Vector3 & pos, SQInt32 alpha, \
bool automatic, SQInt32 header, const SqObj & payload) const noexcept bool automatic, SQInt32 header, SqObj & payload) const noexcept
{ {
return _Core->CreatePickup(*this, world, quantity, pos, alpha, automatic, header, payload); return _Core->CreatePickup(*this, world, quantity, pos, alpha, automatic, header, payload);
} }
Reference< CPickup > CModel::Pickup(SQInt32 world, SQInt32 quantity, SQFloat x, SQFloat y, SQFloat z, \ Reference< CPickup > CModel::Pickup(SQInt32 world, SQInt32 quantity, SQFloat x, SQFloat y, SQFloat z, \
SQInt32 alpha, bool automatic, SQInt32 header, const SqObj & payload) const noexcept SQInt32 alpha, bool automatic, SQInt32 header, SqObj & payload) const noexcept
{ {
return _Core->CreatePickup(*this, world, quantity, Vector3(x, y, z), alpha, automatic, header, payload); return _Core->CreatePickup(*this, world, quantity, Vector3(x, y, z), alpha, automatic, header, payload);
} }
@ -274,10 +274,10 @@ bool Register_CModel(HSQUIRRELVM vm)
.Func(_SC("setng"), &CModel::SetnGet) .Func(_SC("setng"), &CModel::SetnGet)
.Overload< Reference< CObject > (CModel::*)(SQInt32, const Vector3 &, SQInt32, SQInt32, const SqObj &) const >(_SC("object"), &CModel::Object) .Overload< Reference< CObject > (CModel::*)(SQInt32, const Vector3 &, SQInt32, SQInt32, SqObj &) const >(_SC("object"), &CModel::Object)
.Overload< Reference< CObject > (CModel::*)(SQInt32, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32, const SqObj &) const >(_SC("object"), &CModel::Object) .Overload< Reference< CObject > (CModel::*)(SQInt32, SQFloat, SQFloat, SQFloat, SQInt32, SQInt32, SqObj &) const >(_SC("object"), &CModel::Object)
.Overload< Reference< CPickup > (CModel::*)(SQInt32, SQInt32, const Vector3 &, SQInt32, bool, SQInt32, const SqObj &) const >(_SC("pickup"), &CModel::Pickup) .Overload< Reference< CPickup > (CModel::*)(SQInt32, SQInt32, const Vector3 &, SQInt32, bool, SQInt32, SqObj &) const >(_SC("pickup"), &CModel::Pickup)
.Overload< Reference< CPickup > (CModel::*)(SQInt32, SQInt32, SQFloat, SQFloat, SQFloat, SQInt32, bool, SQInt32, const SqObj &) const >(_SC("pickup"), &CModel::Pickup) .Overload< Reference< CPickup > (CModel::*)(SQInt32, SQInt32, SQFloat, SQFloat, SQFloat, SQInt32, bool, SQInt32, SqObj &) const >(_SC("pickup"), &CModel::Pickup)
); );
// Output debugging information // Output debugging information
LogDbg("Registration of <CModel> type was successful"); LogDbg("Registration of <CModel> type was successful");

View File

@ -69,14 +69,14 @@ public:
bool IsActuallyWeapon() const noexcept; bool IsActuallyWeapon() const noexcept;
// -------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------
Reference< CObject > Object(SQInt32 world, const Vector3 & pos, SQInt32 alpha, SQInt32 header, \ Reference< CObject > Object(SQInt32 world, const Vector3 & pos, SQInt32 alpha, SQInt32 header, \
const SqObj & payload) const noexcept; SqObj & payload) const noexcept;
Reference< CObject > Object(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, \ Reference< CObject > Object(SQInt32 world, SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, \
SQInt32 header, const SqObj & payload) const noexcept; SQInt32 header, SqObj & payload) const noexcept;
// -------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------
Reference< CPickup > Pickup(SQInt32 world, SQInt32 quantity, const Vector3 & pos, SQInt32 alpha, \ Reference< CPickup > Pickup(SQInt32 world, SQInt32 quantity, const Vector3 & pos, SQInt32 alpha, \
bool automatic, SQInt32 header, const SqObj & payload) const noexcept; bool automatic, SQInt32 header, SqObj & payload) const noexcept;
Reference< CPickup > Pickup(SQInt32 world, SQInt32 quantity, SQFloat x, SQFloat y, SQFloat z, \ Reference< CPickup > Pickup(SQInt32 world, SQInt32 quantity, SQFloat x, SQFloat y, SQFloat z, \
SQInt32 alpha, bool automatic, SQInt32 header, const SqObj & payload) const noexcept; SQInt32 alpha, bool automatic, SQInt32 header, SqObj & payload) const noexcept;
private: private:
// -------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------
SQInt32 m_ID; SQInt32 m_ID;