new player.* functions
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user