Fix second player no input bug

main
Cameron Murphy Reikes 2 years ago
parent 1a3c709c1e
commit 33a7fa3921

@ -140,7 +140,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);DEBUG_RENDERING;</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);DEBUG_RENDERING;SERVER_ADDRESS="127.0.0.1"</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Users\Cameron\Documents\flight\thirdparty\enet\include;C:\Users\Cameron\Documents\flight\thirdparty\Chipmunk2D\include\chipmunk;C:\Users\Cameron\Documents\flight\thirdparty;C:\Users\Cameron\Documents\flight\thirdparty\Chipmunk2D\include;C:\Users\Cameron\Documents\flight\thirdparty\minilzo</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>

@ -124,6 +124,7 @@ void server(void* data)
event.peer->data = (void*)player_slot;
gs.players[player_slot] = (struct Player){ 0 };
gs.players[player_slot].connected = true;
player_to_latest_id_processed[player_slot] = 0;
#ifdef UNLOCK_ALL
gs.players[player_slot].unlocked_bombs = true;
#endif
@ -134,9 +135,9 @@ void server(void* data)
case ENET_EVENT_TYPE_RECEIVE:
{
// Log("A packet of length %zu was received on channel %u.\n",
//Log("A packet of length %zu was received on channel %u.\n",
// event.packet->dataLength,
// event.channelID);
//event.channelID);
size_t length = event.packet->dataLength;
if (length != sizeof(struct ClientToServer))

Loading…
Cancel
Save