mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-22 15:19:52 +01:00
attempt to reduce "script is not responding" when debugging (valgrind / breakpoints)
This commit is contained in:
parent
b02a72a77b
commit
adb39b91a9
@ -1735,7 +1735,7 @@ void GameView::OnTick(float dt)
|
||||
if (foundSign)
|
||||
{
|
||||
const char* str = foundSign->text.c_str();
|
||||
char type;
|
||||
char type = '\0';
|
||||
int pos = sign::splitsign(str, &type);
|
||||
if (type == 'c' || type == 't' || type == 's')
|
||||
{
|
||||
|
@ -446,6 +446,7 @@ int luacon_elementwrite(lua_State* l)
|
||||
bool shortcuts = true;
|
||||
int luacon_keyevent(int key, Uint16 character, int modifier, int event)
|
||||
{
|
||||
ui::Engine::Ref().LastTick(Platform::GetTime());
|
||||
int kycontinue = 1;
|
||||
lua_State* l=luacon_ci->l;
|
||||
lua_pushstring(l, "keyfunctions");
|
||||
@ -501,6 +502,7 @@ int luacon_keyevent(int key, Uint16 character, int modifier, int event)
|
||||
|
||||
int luacon_mouseevent(int mx, int my, int mb, int event, int mouse_wheel)
|
||||
{
|
||||
ui::Engine::Ref().LastTick(Platform::GetTime());
|
||||
int mpcontinue = 1;
|
||||
lua_State* l=luacon_ci->l;
|
||||
lua_pushstring(l, "mousefunctions");
|
||||
@ -554,6 +556,7 @@ int luacon_mouseevent(int mx, int my, int mb, int event, int mouse_wheel)
|
||||
|
||||
int luacon_step(int mx, int my)
|
||||
{
|
||||
ui::Engine::Ref().LastTick(Platform::GetTime());
|
||||
lua_State* l = luacon_ci->l;
|
||||
lua_pushinteger(l, my);
|
||||
lua_pushinteger(l, mx);
|
||||
|
@ -3473,7 +3473,6 @@ bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, boo
|
||||
|
||||
bool LuaScriptInterface::OnMouseTick()
|
||||
{
|
||||
ui::Engine::Ref().LastTick(Platform::GetTime());
|
||||
if (luacon_mousedown)
|
||||
return luacon_mouseevent(luacon_mousex, luacon_mousey, luacon_mousebutton, LUACON_MPRESS, 0);
|
||||
return true;
|
||||
@ -3488,7 +3487,6 @@ void LuaScriptInterface::OnTick()
|
||||
lua_setfield(l, -2, "NUM_PARTS");
|
||||
}
|
||||
lua_pop(l, 1);
|
||||
ui::Engine::Ref().LastTick(Platform::GetTime());
|
||||
luacon_step(luacon_mousex, luacon_mousey);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user