Sync player knockbackTimer

This commit is contained in:
MysterD 2023-04-28 13:07:58 -07:00
parent d9361989cf
commit 61bb4ff439

View file

@ -72,6 +72,7 @@ struct PacketPlayerData {
u8 levelSyncValid; u8 levelSyncValid;
u8 areaSyncValid; u8 areaSyncValid;
u8 knockbackTimer;
}; };
#pragma pack() #pragma pack()
@ -139,6 +140,8 @@ static void read_packet_data(struct PacketPlayerData* data, struct MarioState* m
struct NetworkPlayer* np = &gNetworkPlayers[m->playerIndex]; struct NetworkPlayer* np = &gNetworkPlayers[m->playerIndex];
data->areaSyncValid = np->currAreaSyncValid; data->areaSyncValid = np->currAreaSyncValid;
data->levelSyncValid = np->currLevelSyncValid; data->levelSyncValid = np->currLevelSyncValid;
data->knockbackTimer = m->knockbackTimer;
} }
static void write_packet_data(struct PacketPlayerData* data, struct MarioState* m, static void write_packet_data(struct PacketPlayerData* data, struct MarioState* m,
@ -201,6 +204,8 @@ static void write_packet_data(struct PacketPlayerData* data, struct MarioState*
np->currAreaSyncValid = data->areaSyncValid; np->currAreaSyncValid = data->areaSyncValid;
np->currLevelSyncValid = data->levelSyncValid; np->currLevelSyncValid = data->levelSyncValid;
} }
m->knockbackTimer = data->knockbackTimer;
} }
void network_send_player(u8 localIndex) { void network_send_player(u8 localIndex) {