mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Added constructor to create a player entity reference from a base reference.
This commit is contained in:
parent
8d8c9be2fd
commit
b0c174e75e
@ -18,6 +18,13 @@ Vector3 CPlayer::s_Vector3;
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQChar CPlayer::s_Buffer[128];
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CPlayer::CPlayer(const Reference< CPlayer > & o) noexcept
|
||||
: Reference(o)
|
||||
{
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CPlayer::IsStreamedFor(const Reference < CPlayer > & player) const noexcept
|
||||
{
|
||||
@ -1700,10 +1707,12 @@ bool Register_CPlayer(HSQUIRRELVM vm)
|
||||
// Registration failed
|
||||
return false;
|
||||
}
|
||||
// Typedef the base reference type for simplicity
|
||||
typedef Reference< CPlayer > RefType;
|
||||
// Output debugging information
|
||||
LogDbg("Beginning registration of <CPlayer> type");
|
||||
// Attempt to register the actual reference that implements all of the entity functionality
|
||||
Sqrat::RootTable(vm).Bind(_SC("CPlayer"), Sqrat::DerivedClass< CPlayer, Reference< CPlayer > >(vm, _SC("CPlayer"))
|
||||
Sqrat::RootTable(vm).Bind(_SC("CPlayer"), Sqrat::DerivedClass< CPlayer, RefType >(vm, _SC("CPlayer"))
|
||||
/* Constructors */
|
||||
.Ctor()
|
||||
.Ctor< SQInt32 >()
|
||||
|
@ -30,6 +30,11 @@ public:
|
||||
*/
|
||||
using RefType::Reference;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Construct a reference from a base reference.
|
||||
*/
|
||||
CPlayer(const Reference< CPlayer > & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* See if the referenced player instance is streamed for the specified player.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user