mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Fix crashing on reconnect with C client
This commit is contained in:
parent
b5a4156228
commit
c55400849c
@ -1520,7 +1520,7 @@ bool DisconnectScreen_HandlesMouseDown(GuiElement* elem, Int32 x, Int32 y, Mouse
|
||||
|
||||
if (!widget->Disabled && Widget_Contains((Widget*)widget, x, y)) {
|
||||
UInt8 connectBuffer[String_BufferSize(STRING_SIZE)];
|
||||
String connect = String_FromConst(connectBuffer);
|
||||
String connect = String_InitAndClearArray(connectBuffer);
|
||||
String empty = String_MakeNull();
|
||||
String_Format2(&connect, "Connecting to %s: %i..", &Game_IPAddress, &Game_Port);
|
||||
|
||||
|
@ -492,7 +492,7 @@ void ServerConnection_InitMultiplayer(void) {
|
||||
|
||||
|
||||
void MPConnection_OnNewMap(void) {
|
||||
if (!ServerConnection_IsSinglePlayer) return;
|
||||
if (ServerConnection_IsSinglePlayer) return;
|
||||
/* wipe all existing entity states */
|
||||
Int32 i;
|
||||
for (i = 0; i < ENTITIES_MAX_COUNT; i++) {
|
||||
@ -501,7 +501,7 @@ void MPConnection_OnNewMap(void) {
|
||||
}
|
||||
|
||||
void MPConnection_Reset(void) {
|
||||
if (!ServerConnection_IsSinglePlayer) return;
|
||||
if (ServerConnection_IsSinglePlayer) return;
|
||||
Int32 i;
|
||||
for (i = 0; i < OPCODE_COUNT; i++) {
|
||||
Net_Handlers[i] = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user