mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Reduce the task parameters to 8.
Remove the Self property from the tasks because it's useless.
This commit is contained in:
parent
a04fd3ba15
commit
2449a44c1f
@ -157,7 +157,6 @@ void Tasks::Register(HSQUIRRELVM vm)
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_tostring"), &Task::ToString)
|
||||
// Properties
|
||||
.Prop(_SC("Self"), &Task::GetSelf)
|
||||
.Prop(_SC("Inst"), &Task::GetInst)
|
||||
.Prop(_SC("Func"), &Task::GetFunc, &Task::SetFunc)
|
||||
.Prop(_SC("Data"), &Task::GetData, &Task::SetData)
|
||||
@ -223,7 +222,7 @@ SQInteger Tasks::Create(Int32 id, Int32 type, HSQUIRRELVM vm)
|
||||
// Grab the top of the stack
|
||||
const SQInteger top = sq_gettop(vm);
|
||||
// See if too many arguments were specified
|
||||
if (top > 18) /* 4 base + 14 parameters = 18 */
|
||||
if (top > 12) /* 4 base + 8 parameters = 12 */
|
||||
{
|
||||
return sq_throwerror(vm, "Too many parameter specified");
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ private:
|
||||
Int16 mEntity; // The identifier of the entity to which is belongs.
|
||||
Uint8 mType; // The type of the entity to which is belongs.
|
||||
Uint8 mArgc; // The number of arguments that the task must forward.
|
||||
Argument mArgv[14]; // The arguments that the task must forward.
|
||||
Argument mArgv[8]; // The arguments that the task must forward.
|
||||
|
||||
/* ----------------------------------------------------------------------------------------
|
||||
* Default constructor.
|
||||
@ -136,14 +136,6 @@ private:
|
||||
*/
|
||||
Interval Execute();
|
||||
|
||||
/* ----------------------------------------------------------------------------------------
|
||||
* Retrieve the instance to self.
|
||||
*/
|
||||
const LightObj & GetSelf() const
|
||||
{
|
||||
return mSelf;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------------------
|
||||
* Retrieve the instance to entity instance.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user