new player.* functions

This commit is contained in:
MihailRis
2024-05-24 01:38:39 +03:00
parent 0ad3dd7ab8
commit 1917cbba8b
16 changed files with 306 additions and 224 deletions
+4 -3
View File
@@ -137,7 +137,8 @@ doublesupplier scripting::create_number_supplier(
if (state->isfunction(-1)) {
state->callNoThrow(0);
}
lua::luanumber x = state->tonumber(-1); state->pop();
auto x = state->tonumber(-1);
state->pop();
return x;
}
return 0.0;
@@ -169,8 +170,8 @@ vec2supplier scripting::create_vec2_supplier(
if (state->isfunction(-1)) {
state->callNoThrow(0);
}
lua::luanumber y = state->tonumber(-1); state->pop();
lua::luanumber x = state->tonumber(-1); state->pop();
auto y = state->tonumber(-1); state->pop();
auto x = state->tonumber(-1); state->pop();
return glm::vec2(x, y);
}
return glm::vec2(0, 0);