mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Nice syncing code Sunk
This commit is contained in:
parent
d6df2ff210
commit
183018cf3c
6 changed files with 8 additions and 6 deletions
|
|
@ -204,7 +204,7 @@ NORMAL = "Normal"
|
||||||
TOO_MUCH = "Demasiada"
|
TOO_MUCH = "Demasiada"
|
||||||
KNOCKBACK_STRENGTH = "Fuerza de retroceso"
|
KNOCKBACK_STRENGTH = "Fuerza de retroceso"
|
||||||
CLASSIC_PVP = "Clásico"
|
CLASSIC_PVP = "Clásico"
|
||||||
REVAMPED_PVP = "Renovado"
|
REVAMPED_PVP = "Revisado"
|
||||||
PVP_MODE = "Modo Jugador contra Jugador"
|
PVP_MODE = "Modo Jugador contra Jugador"
|
||||||
LEAVE_LEVEL = "Salir del nivel"
|
LEAVE_LEVEL = "Salir del nivel"
|
||||||
STAY_IN_LEVEL = "Seguir en el nivel"
|
STAY_IN_LEVEL = "Seguir en el nivel"
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ bool configMenuDemos = false;
|
||||||
bool configDisablePopups = false;
|
bool configDisablePopups = false;
|
||||||
char configLanguage[MAX_CONFIG_STRING] = "";
|
char configLanguage[MAX_CONFIG_STRING] = "";
|
||||||
bool configDynosLocalPlayerModelOnly = false;
|
bool configDynosLocalPlayerModelOnly = false;
|
||||||
unsigned int configPvpMode = PLAYER_PVP_CLASSIC;
|
unsigned int configPvpType = PLAYER_PVP_CLASSIC;
|
||||||
// CoopNet settings
|
// CoopNet settings
|
||||||
char configCoopNetIp[MAX_CONFIG_STRING] = DEFAULT_COOPNET_IP;
|
char configCoopNetIp[MAX_CONFIG_STRING] = DEFAULT_COOPNET_IP;
|
||||||
unsigned int configCoopNetPort = DEFAULT_COOPNET_PORT;
|
unsigned int configCoopNetPort = DEFAULT_COOPNET_PORT;
|
||||||
|
|
@ -301,7 +301,7 @@ static const struct ConfigOption options[] = {
|
||||||
{.name = "coop_menu_level", .type = CONFIG_TYPE_UINT, .uintValue = &configMenuLevel},
|
{.name = "coop_menu_level", .type = CONFIG_TYPE_UINT, .uintValue = &configMenuLevel},
|
||||||
{.name = "coop_menu_sound", .type = CONFIG_TYPE_UINT, .uintValue = &configMenuSound},
|
{.name = "coop_menu_sound", .type = CONFIG_TYPE_UINT, .uintValue = &configMenuSound},
|
||||||
{.name = "coop_menu_random", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuRandom},
|
{.name = "coop_menu_random", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuRandom},
|
||||||
{.name = "player_pvp_mode", .type = CONFIG_TYPE_UINT, .uintValue = &configPvpMode},
|
{.name = "player_pvp_mode", .type = CONFIG_TYPE_UINT, .uintValue = &configPvpType},
|
||||||
// {.name = "coop_menu_demos", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuDemos},
|
// {.name = "coop_menu_demos", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuDemos},
|
||||||
{.name = "disable_popups", .type = CONFIG_TYPE_BOOL, .boolValue = &configDisablePopups},
|
{.name = "disable_popups", .type = CONFIG_TYPE_BOOL, .boolValue = &configDisablePopups},
|
||||||
{.name = "language", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configLanguage, .maxStringLength = MAX_CONFIG_STRING},
|
{.name = "language", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configLanguage, .maxStringLength = MAX_CONFIG_STRING},
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ extern bool configMenuDemos;
|
||||||
extern bool configDisablePopups;
|
extern bool configDisablePopups;
|
||||||
extern char configLanguage[MAX_CONFIG_STRING];
|
extern char configLanguage[MAX_CONFIG_STRING];
|
||||||
extern bool configDynosLocalPlayerModelOnly;
|
extern bool configDynosLocalPlayerModelOnly;
|
||||||
extern unsigned int configPvpMode;
|
extern unsigned int configPvpType;
|
||||||
// CoopNet settings
|
// CoopNet settings
|
||||||
extern char configCoopNetIp[MAX_CONFIG_STRING];
|
extern char configCoopNetIp[MAX_CONFIG_STRING];
|
||||||
extern unsigned int configCoopNetPort;
|
extern unsigned int configCoopNetPort;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ void djui_panel_host_settings_create(struct DjuiBase* caller) {
|
||||||
djui_selectionbox_create(body, DLANG(HOST_SETTINGS, KNOCKBACK_STRENGTH), kChoices, 3, &sKnockbackIndex, djui_panel_host_settings_knockback_change);
|
djui_selectionbox_create(body, DLANG(HOST_SETTINGS, KNOCKBACK_STRENGTH), kChoices, 3, &sKnockbackIndex, djui_panel_host_settings_knockback_change);
|
||||||
|
|
||||||
char* pChoices[2] = { DLANG(HOST_SETTINGS, CLASSIC_PVP), DLANG(HOST_SETTINGS, REVAMPED_PVP) };
|
char* pChoices[2] = { DLANG(HOST_SETTINGS, CLASSIC_PVP), DLANG(HOST_SETTINGS, REVAMPED_PVP) };
|
||||||
djui_selectionbox_create(body, DLANG(HOST_SETTINGS, PVP_MODE), pChoices, 2, &configPvpMode, NULL);
|
djui_selectionbox_create(body, DLANG(HOST_SETTINGS, PVP_MODE), pChoices, 2, &configPvpType, NULL);
|
||||||
|
|
||||||
char* lChoices[3] = { DLANG(HOST_SETTINGS, LEAVE_LEVEL), DLANG(HOST_SETTINGS, STAY_IN_LEVEL), DLANG(HOST_SETTINGS, NONSTOP) };
|
char* lChoices[3] = { DLANG(HOST_SETTINGS, LEAVE_LEVEL), DLANG(HOST_SETTINGS, STAY_IN_LEVEL), DLANG(HOST_SETTINGS, NONSTOP) };
|
||||||
djui_selectionbox_create(body, DLANG(HOST_SETTINGS, ON_STAR_COLLECTION), lChoices, 3, &configStayInLevelAfterStar, NULL);
|
djui_selectionbox_create(body, DLANG(HOST_SETTINGS, ON_STAR_COLLECTION), lChoices, 3, &configStayInLevelAfterStar, NULL);
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) {
|
||||||
gServerSettings.nametags = configNametags;
|
gServerSettings.nametags = configNametags;
|
||||||
gServerSettings.maxPlayers = configAmountofPlayers;
|
gServerSettings.maxPlayers = configAmountofPlayers;
|
||||||
gServerSettings.pauseAnywhere = configPauseAnywhere;
|
gServerSettings.pauseAnywhere = configPauseAnywhere;
|
||||||
gServerSettings.pvpType = configPvpMode;
|
gServerSettings.pvpType = configPvpType;
|
||||||
#if defined(RAPI_DUMMY) || defined(WAPI_DUMMY)
|
#if defined(RAPI_DUMMY) || defined(WAPI_DUMMY)
|
||||||
gServerSettings.headlessServer = (inNetworkType == NT_SERVER);
|
gServerSettings.headlessServer = (inNetworkType == NT_SERVER);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ void network_send_join(struct Packet* joinRequestPacket) {
|
||||||
packet_write(&p, &gServerSettings.nametags, sizeof(u8));
|
packet_write(&p, &gServerSettings.nametags, sizeof(u8));
|
||||||
packet_write(&p, &gServerSettings.maxPlayers, sizeof(u8));
|
packet_write(&p, &gServerSettings.maxPlayers, sizeof(u8));
|
||||||
packet_write(&p, &gServerSettings.pauseAnywhere, sizeof(u8));
|
packet_write(&p, &gServerSettings.pauseAnywhere, sizeof(u8));
|
||||||
|
packet_write(&p, &gServerSettings.pvpType, sizeof(u8));
|
||||||
packet_write(&p, eeprom, sizeof(u8) * 512);
|
packet_write(&p, eeprom, sizeof(u8) * 512);
|
||||||
|
|
||||||
network_send_to(globalIndex, &p);
|
network_send_to(globalIndex, &p);
|
||||||
|
|
@ -177,6 +178,7 @@ void network_receive_join(struct Packet* p) {
|
||||||
packet_read(p, &gServerSettings.nametags, sizeof(u8));
|
packet_read(p, &gServerSettings.nametags, sizeof(u8));
|
||||||
packet_read(p, &gServerSettings.maxPlayers, sizeof(u8));
|
packet_read(p, &gServerSettings.maxPlayers, sizeof(u8));
|
||||||
packet_read(p, &gServerSettings.pauseAnywhere, sizeof(u8));
|
packet_read(p, &gServerSettings.pauseAnywhere, sizeof(u8));
|
||||||
|
packet_read(p, &gServerSettings.pvpType, sizeof(u8));
|
||||||
packet_read(p, eeprom, sizeof(u8) * 512);
|
packet_read(p, eeprom, sizeof(u8) * 512);
|
||||||
|
|
||||||
network_player_connected(NPT_SERVER, 0, 0, &DEFAULT_MARIO_PALETTE, "Player", "0");
|
network_player_connected(NPT_SERVER, 0, 0, &DEFAULT_MARIO_PALETTE, "Player", "0");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue