refactor lua scripting a bit

This commit is contained in:
MihailRis
2024-08-19 00:57:49 +03:00
parent ddee38681e
commit 8ef288c189
7 changed files with 169 additions and 143 deletions
+2 -2
View File
@@ -335,7 +335,7 @@ static int l_audio_get_duration(lua::State* L) {
static int l_audio_get_position(lua::State* L) {
auto speaker = audio::get_speaker(lua::tointeger(L, 1));
if (speaker != nullptr) {
return lua::pushvec3_stack(L, speaker->getPosition());
return lua::pushvec_stack(L, speaker->getPosition());
}
return 0;
}
@@ -344,7 +344,7 @@ static int l_audio_get_position(lua::State* L) {
static int l_audio_get_velocity(lua::State* L) {
auto speaker = audio::get_speaker(lua::tointeger(L, 1));
if (speaker != nullptr) {
return lua::pushvec3_stack(L, speaker->getVelocity());
return lua::pushvec_stack(L, speaker->getVelocity());
}
return 0;
}