mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-05 07:01:18 +00:00
Removed server enforcement of unique player palettes
This commit is contained in:
parent
05999a9ae8
commit
8837dcc023
3 changed files with 0 additions and 20 deletions
|
@ -25,22 +25,6 @@ void network_player_update_model(u8 localIndex) {
|
|||
m->marioObj->header.gfx.sharedChild = gLoadedGraphNodes[m->character->modelId];
|
||||
}
|
||||
|
||||
u8 network_player_unique_palette(u8 palette) {
|
||||
u16 iterations = 0;
|
||||
retry_palette:
|
||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
||||
if (!gNetworkPlayers[i].connected) { continue; }
|
||||
if (gNetworkPlayers[i].paletteIndex == palette) {
|
||||
palette = (palette + 1) % gNumPlayerColors;
|
||||
if (iterations++ >= gNumPlayerColors) {
|
||||
return palette;
|
||||
}
|
||||
goto retry_palette;
|
||||
}
|
||||
}
|
||||
return palette;
|
||||
}
|
||||
|
||||
bool network_player_any_connected(void) {
|
||||
for (int i = 1; i < MAX_PLAYERS; i++) {
|
||||
if (gNetworkPlayers[i].connected) { return true; }
|
||||
|
|
|
@ -48,7 +48,6 @@ extern struct NetworkPlayer* gNetworkPlayerServer;
|
|||
|
||||
void network_player_init(void);
|
||||
void network_player_update_model(u8 localIndex);
|
||||
u8 network_player_unique_palette(u8 palette);
|
||||
bool network_player_any_connected(void);
|
||||
u8 network_player_connected_count(void);
|
||||
struct NetworkPlayer* network_player_from_global_index(u8 globalIndex);
|
||||
|
|
|
@ -61,9 +61,6 @@ void network_receive_join_request(struct Packet* p) {
|
|||
void network_send_join(struct Packet* joinRequestPacket) {
|
||||
SOFT_ASSERT(gNetworkType == NT_SERVER);
|
||||
|
||||
// make palette unique
|
||||
sJoinRequestPlayerPalette = network_player_unique_palette(sJoinRequestPlayerPalette);
|
||||
|
||||
// do connection event
|
||||
joinRequestPacket->localIndex = network_player_connected(NPT_CLIENT, joinRequestPacket->localIndex, sJoinRequestPlayerModel, sJoinRequestPlayerPalette, sJoinRequestPlayerName);
|
||||
if (joinRequestPacket->localIndex == UNKNOWN_LOCAL_INDEX) {
|
||||
|
|
Loading…
Reference in a new issue