mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
new player.* functions
This commit is contained in:
parent
0ad3dd7ab8
commit
1917cbba8b
16 changed files with 306 additions and 224 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue