mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-04-24 21:27:12 +02:00
Fix GetWorldBounds() and GetWastedSettings() returning null.
By not giving a virtual machine to the table contructor it defaults to null. Which ignores subsequent values getting assigned and esentially returning null.
This commit is contained in:
parent
4bf1443260
commit
f0b00fb07f
@ -418,7 +418,7 @@ Table GetWorldBounds()
|
|||||||
// Retrieve the current world bounds
|
// Retrieve the current world bounds
|
||||||
_Func->GetWorldBounds(&max.x, &min.x, &max.y, &min.y);
|
_Func->GetWorldBounds(&max.x, &min.x, &max.y, &min.y);
|
||||||
// Allocate a script table
|
// Allocate a script table
|
||||||
Table tbl;
|
Table tbl(SqVM(), 2);
|
||||||
// Populate the table with the obtained values
|
// Populate the table with the obtained values
|
||||||
tbl.SetValue(_SC("max"), max);
|
tbl.SetValue(_SC("max"), max);
|
||||||
tbl.SetValue(_SC("min"), min);
|
tbl.SetValue(_SC("min"), min);
|
||||||
@ -448,7 +448,7 @@ Table GetWastedSettings()
|
|||||||
// Convert the packed color
|
// Convert the packed color
|
||||||
c.SetRGB(fc);
|
c.SetRGB(fc);
|
||||||
// Allocate a script table
|
// Allocate a script table
|
||||||
Table tbl;
|
Table tbl(SqVM(), 8);
|
||||||
// Populate the table with the obtained values
|
// Populate the table with the obtained values
|
||||||
tbl.SetValue(_SC("DeathTimerOut"), dt);
|
tbl.SetValue(_SC("DeathTimerOut"), dt);
|
||||||
tbl.SetValue(_SC("FadeTimer"), ft);
|
tbl.SetValue(_SC("FadeTimer"), ft);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user