mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-01 06:27:11 +02:00
Initial implementation of the new event system.
Initial implementation of the new signals and slots class. Fixed command parsing which compared a pointer to a character. Buffer overflow fix in routines which used the limits from the entity tasks. Switched from Sqrat::Object to Sqrat::LightObj in most places to avoid the overhead of the VM pointer. Various other adjustments and improvements. The plugin is currently in a broken state and crashes at shutdown. The bug is unknown at this point.
This commit is contained in:
@ -20,17 +20,17 @@ private:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Identifier of the managed entity.
|
||||
*/
|
||||
Int32 m_ID;
|
||||
Int32 m_ID;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* User tag associated with this instance.
|
||||
*/
|
||||
String m_Tag;
|
||||
String m_Tag;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* User data associated with this instance.
|
||||
*/
|
||||
Object m_Data;
|
||||
LightObj m_Data;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Base constructor.
|
||||
@ -93,7 +93,7 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated null entity instance.
|
||||
*/
|
||||
static Object & GetNull();
|
||||
static LightObj & GetNull();
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the identifier of the entity managed by this instance.
|
||||
@ -129,19 +129,19 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
*/
|
||||
Object & GetData();
|
||||
LightObj & GetData();
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user data.
|
||||
*/
|
||||
void SetData(Object & data);
|
||||
void SetData(LightObj & data);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Destroy the managed blip entity.
|
||||
*/
|
||||
bool Destroy()
|
||||
{
|
||||
return Destroy(0, NullObject());
|
||||
return Destroy(0, NullLightObj());
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
@ -149,23 +149,23 @@ public:
|
||||
*/
|
||||
bool Destroy(Int32 header)
|
||||
{
|
||||
return Destroy(header, NullObject());
|
||||
return Destroy(header, NullLightObj());
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Destroy the managed blip entity.
|
||||
*/
|
||||
bool Destroy(Int32 header, Object & payload);
|
||||
bool Destroy(Int32 header, LightObj & payload);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Bind to an event supported by this entity type.
|
||||
* Retrieve the events table of this entity.
|
||||
*/
|
||||
void BindEvent(Int32 evid, Object & env, Function & func) const;
|
||||
LightObj & GetEvents() const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Emit a custom event for the managed entity
|
||||
*/
|
||||
void CustomEvent(Int32 header, Object & payload) const;
|
||||
void CustomEvent(Int32 header, LightObj & payload) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the world in which the referenced blip entity exists.
|
||||
|
Reference in New Issue
Block a user