mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01: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
|
||||
_Func->GetWorldBounds(&max.x, &min.x, &max.y, &min.y);
|
||||
// Allocate a script table
|
||||
Table tbl;
|
||||
Table tbl(SqVM(), 2);
|
||||
// Populate the table with the obtained values
|
||||
tbl.SetValue(_SC("max"), max);
|
||||
tbl.SetValue(_SC("min"), min);
|
||||
@ -448,7 +448,7 @@ Table GetWastedSettings()
|
||||
// Convert the packed color
|
||||
c.SetRGB(fc);
|
||||
// Allocate a script table
|
||||
Table tbl;
|
||||
Table tbl(SqVM(), 8);
|
||||
// Populate the table with the obtained values
|
||||
tbl.SetValue(_SC("DeathTimerOut"), dt);
|
||||
tbl.SetValue(_SC("FadeTimer"), ft);
|
||||
|
Loading…
Reference in New Issue
Block a user