summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console.c13
-rw-r--r--console.h2
-rw-r--r--network.c9
3 files changed, 16 insertions, 8 deletions
diff --git a/console.c b/console.c
index 13a163667..35945356a 100644
--- a/console.c
+++ b/console.c
@@ -65,8 +65,8 @@ static void IConsoleWndProc(Window *w, WindowEvent *e)
{
switch(e->event) {
- case WE_PAINT:
-
+ case WE_PAINT:
+
GfxFillRect(w->left,w->top,w->width,w->height-1,0);
{
int i=_iconsole_scroll;
@@ -100,6 +100,11 @@ static void IConsoleWndProc(Window *w, WindowEvent *e)
}
break;
+ case WE_DESTROY:
+ _iconsole_win=NULL;
+ _iconsole_mode=ICONSOLE_CLOSED;
+ break;
+
case WE_KEYPRESS:
e->keypress.cont=false;
if (e->keypress.keycode == (WKC_UP))
@@ -257,7 +262,7 @@ void IConsoleSwitch()
}
void IConsoleClose() {
-if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch();
+if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch();
_iconsole_mode=ICONSOLE_CLOSED;
}
@@ -333,7 +338,7 @@ if (_iconsole_win!=NULL) SetWindowDirty(_iconsole_win);
}
-void IConsolePrintF(byte color_code, const char *s, ...)
+void CDECL IConsolePrintF(byte color_code, const char *s, ...)
{
va_list va;
char buf[1024];
diff --git a/console.h b/console.h
index 6b6e87eab..11fc70bdb 100644
--- a/console.h
+++ b/console.h
@@ -65,7 +65,7 @@ void IConsoleCmdBufferNavigate(signed char direction);
// ** console output ** //
void IConsolePrint(byte color_code, byte* string);
-void IConsolePrintF(byte color_code, const char *s, ...);
+void CDECL IConsolePrintF(byte color_code, const char *s, ...);
void IConsoleDebug(byte* string);
void IConsoleError(byte* string);
diff --git a/network.c b/network.c
index cab69cc47..b75b0c6f2 100644
--- a/network.c
+++ b/network.c
@@ -1100,7 +1100,12 @@ void NetworkClose(bool client) {
void NetworkShutdown()
{
-
+ _networking_server = false;
+ _networking = false;
+ _networking_sync = false;
+ _frame_counter = 0;
+ _frame_counter_max = 0;
+ _frame_counter_srv = 0;
}
// switch to synced mode.
@@ -1491,8 +1496,6 @@ void NetworkCoreDisconnect()
NetworkClose(true);
}
- _networking_server = false;
- _networking = false;
NetworkShutdown();
}