From 1fee40f9f45427411800bd009795288a503afe4f Mon Sep 17 00:00:00 2001 From: cyrre Date: Mon, 4 Nov 2013 00:22:56 +0000 Subject: [PATCH] added me.unsupported. me.gamestarttime should now work for quickly joined games (sp). --- D2BS.h | 2 +- D2Handlers.cpp | 3 ++- JSUnit.cpp | 3 +++ JSUnit.h | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/D2BS.h b/D2BS.h index e0315b54..d955661d 100644 --- a/D2BS.h +++ b/D2BS.h @@ -5,7 +5,7 @@ #define XP_WIN -#define D2BS_VERSION "1.5.1805" //uptodate with d branch 1765 ff 20b +#define D2BS_VERSION "1.5.1806" //uptodate with d branch 1765 ff 20b #include #include diff --git a/D2Handlers.cpp b/D2Handlers.cpp index 7721b840..41adc32d 100644 --- a/D2Handlers.cpp +++ b/D2Handlers.cpp @@ -55,9 +55,10 @@ DWORD WINAPI D2Thread(LPVOID lpParam) } else { + Vars.dwGameTime = GetTickCount(); + Sleep(500); - Vars.dwGameTime = GetTickCount(); D2CLIENT_InitInventory(); ScriptEngine::ForEachScript(UpdatePlayerGid, NULL, 0); ScriptEngine::UpdateConsole(); diff --git a/JSUnit.cpp b/JSUnit.cpp index 6ce9db89..4e778ebf 100644 --- a/JSUnit.cpp +++ b/JSUnit.cpp @@ -171,6 +171,9 @@ JSAPI_PROP(unit_getProperty) case ME_BLOCKMOUSE: vp.setBoolean(Vars.bBlockMouse); break; + case ME_UNSUPPORTED: + vp.setBoolean(Vars.bEnableUnsupported); + break; default: break; } diff --git a/JSUnit.h b/JSUnit.h index f895a10b..66914c40 100644 --- a/JSUnit.h +++ b/JSUnit.h @@ -110,7 +110,8 @@ enum me_tinyid { ME_GAMEREADY, ME_PROFILE, ME_NOPICKUP, - ME_PID + ME_PID, + ME_UNSUPPORTED }; static JSPropertySpec me_props[] = { @@ -143,6 +144,7 @@ static JSPropertySpec me_props[] = { {"profile", ME_PROFILE, JSPROP_PERMANENT_VAR, JSOP_WRAPPER(unit_getProperty), JSOP_NULLWRAPPER }, {"nopickup", ME_NOPICKUP, JSPROP_STATIC_VAR, JSOP_WRAPPER(unit_getProperty), JSOP_WRAPPER(unit_setProperty)}, {"pid", ME_PID, JSPROP_PERMANENT_VAR, JSOP_WRAPPER(unit_getProperty), JSOP_NULLWRAPPER }, + {"unsupported", ME_UNSUPPORTED, JSPROP_PERMANENT_VAR, JSOP_WRAPPER(unit_getProperty), JSOP_NULLWRAPPER }, {"screensize", OOG_SCREENSIZE, JSPROP_PERMANENT_VAR, JSOP_WRAPPER(unit_getProperty), JSOP_NULLWRAPPER }, {"windowtitle", OOG_WINDOWTITLE, JSPROP_PERMANENT_VAR, JSOP_WRAPPER(unit_getProperty), JSOP_NULLWRAPPER },