mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-16 22:42:31 +03:00
Optimize void return in squirrel function call stub
This commit is contained in:
parent
1ecaa44c49
commit
8e8bdfc371
@ -1429,8 +1429,15 @@ SQInteger function_stub(HSQUIRRELVM vm)
|
||||
{
|
||||
Assert(script_retval.m_type == pFunc->m_desc.m_ReturnType);
|
||||
|
||||
PushVariant(vm, script_retval);
|
||||
sq_retval = 1;
|
||||
if (pFunc->m_desc.m_ReturnType != FIELD_VOID)
|
||||
{
|
||||
PushVariant(vm, script_retval);
|
||||
sq_retval = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sq_retval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// strings never get copied here, Vector and QAngle are stored in script_retval_storage
|
||||
|
Loading…
x
Reference in New Issue
Block a user