feat: Support for G2O v0.3.3

This commit is contained in:
AURUMVORXX
2025-08-14 21:04:40 +05:00
parent 35350efcd1
commit 2ee00d1842
7 changed files with 40 additions and 6 deletions

View File

@@ -594,4 +594,16 @@ addEventHandler("onPlayerUnspawnForPlayer", function(playerid, spawnid)
if (_globalInstance != -1)
_globalInstance._send("event", data);
});
});
addEventHandler("onPlayerChangeChunk", function(playerid, chunk_index)
{
local data = {
event = "onPlayerChangeChunk",
playerid = playerid,
chunk_index = chunk_index
}
if (_globalInstance != -1)
_globalInstance._send("event", data);
});

View File

@@ -90,6 +90,8 @@ class PyG2O
return "ItemGround";
else if (object instanceof Vec3)
return "Vec3";
else if (object instanceof Vec2i)
return "Vec2i";
return null;
}
@@ -152,4 +154,4 @@ class PyG2O
_callMessage(request["type"], request);
}
}
}

View File

@@ -11,6 +11,12 @@ function _message_call(data)
data["data"]["y"] <- result.y;
data["data"]["z"] <- result.z;
}
else if (className == "Vec2i")
{
data["data"] = {};
data["data"]["x"] <- result.x;
data["data"]["y"] <- result.y;
}
else if (className != null)
{
data["data"] = {};
@@ -21,4 +27,4 @@ function _message_call(data)
data["data"] = result;
_send("result", data["data"], data["uuid"]);
}
}