projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hopefully fixed the crash on exit, keep sectors script bundled in the sector and...
[supertux.git]
/
src
/
scripting
/
functions.cpp
diff --git
a/src/scripting/functions.cpp
b/src/scripting/functions.cpp
index
21712a6
..
c3a4bf8
100644
(file)
--- a/
src/scripting/functions.cpp
+++ b/
src/scripting/functions.cpp
@@
-50,11
+50,15
@@
int display(HSQUIRRELVM vm)
void wait(HSQUIRRELVM vm, float seconds)
{
void wait(HSQUIRRELVM vm, float seconds)
{
+ SQUserPointer ptr = sq_getforeignptr(vm);
+ ScriptManager* script_manager = reinterpret_cast<ScriptManager*> (ptr);
script_manager->set_wakeup_event(vm, ScriptManager::TIME, seconds);
}
void wait_for_screenswitch(HSQUIRRELVM vm)
{
script_manager->set_wakeup_event(vm, ScriptManager::TIME, seconds);
}
void wait_for_screenswitch(HSQUIRRELVM vm)
{
+ SQUserPointer ptr = sq_getforeignptr(vm);
+ ScriptManager* script_manager = reinterpret_cast<ScriptManager*> (ptr);
script_manager->set_wakeup_event(vm, ScriptManager::SCREEN_SWITCHED);
}
script_manager->set_wakeup_event(vm, ScriptManager::SCREEN_SWITCHED);
}