From de1e24b7b94c6a6fbb7c15884d90d48e429c5c42 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Sun, 17 Mar 2024 16:32:49 -0400 Subject: [PATCH] Remove sm64ex-coop compatibility --- autogen/lua_constants/built-in.lua | 9 ++++++- autogen/lua_definitions/constants.lua | 7 ++++++ autogen/lua_definitions/functions.lua | 5 ---- autogen/lua_definitions/structs.lua | 1 - data/dynos_warps.cpp | 2 +- docs/lua/functions-5.md | 18 -------------- docs/lua/functions.md | 1 - docs/lua/structs.md | 1 - src/game/area.c | 2 +- src/game/behaviors/recovery_heart.inc.c | 2 +- src/game/interaction.c | 31 ++++++------------------ src/game/object_collision.c | 2 +- src/pc/configfile.c | 2 -- src/pc/configfile.h | 1 - src/pc/discord/discord.c | 3 +-- src/pc/djui/djui_panel_host_settings.c | 6 ++--- src/pc/djui/djui_panel_join.c | 3 --- src/pc/djui/djui_panel_join_direct.c | 13 ---------- src/pc/djui/djui_panel_misc.c | 3 --- src/pc/lua/smlua_cobject_autogen.c | 3 +-- src/pc/lua/smlua_constants_autogen.c | 4 +++ src/pc/lua/smlua_functions_autogen.c | 16 ------------ src/pc/lua/utils/smlua_misc_utils.c | 6 ----- src/pc/lua/utils/smlua_misc_utils.h | 2 -- src/pc/mods/mod.c | 2 -- src/pc/mods/mod.h | 1 - src/pc/mods/mods_utils.c | 11 --------- src/pc/network/network.c | 4 +-- src/pc/network/network_player.c | 2 +- src/pc/network/packets/packet_join.c | 16 +++--------- src/pc/network/packets/packet_mod_list.c | 10 ++------ 31 files changed, 44 insertions(+), 145 deletions(-) diff --git a/autogen/lua_constants/built-in.lua b/autogen/lua_constants/built-in.lua index 002d1173..bd23fc81 100644 --- a/autogen/lua_constants/built-in.lua +++ b/autogen/lua_constants/built-in.lua @@ -400,4 +400,11 @@ COURSE_MIN = 1 -- legacy font -- ----------------- -FONT_TINY = -1 \ No newline at end of file +FONT_TINY = -1 + + +---------------------- +-- legacy functions -- +---------------------- + +function get_coop_compatibility_enabled() return false end \ No newline at end of file diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index 0da58781..7a52b76a 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -404,6 +404,13 @@ COURSE_MIN = 1 FONT_TINY = -1 + +---------------------- +-- legacy functions -- +---------------------- + +function get_coop_compatibility_enabled() return false end + --- @type integer INSTANT_WARP_INDEX_START = 0x00 diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index 7089eb33..f3862fac 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -8704,11 +8704,6 @@ function djui_set_popup_disabled_override(value) -- ... end ---- @return boolean -function get_coop_compatibility_enabled() - -- ... -end - --- @return integer function get_current_save_file_num() -- ... diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index 56bc8f44..a7b7612d 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -1053,7 +1053,6 @@ --- @class Mod --- @field public basePath string --- @field public customBehaviorIndex integer ---- @field public deluxe boolean --- @field public description string --- @field public enabled boolean --- @field public fileCount integer diff --git a/data/dynos_warps.cpp b/data/dynos_warps.cpp index 55e895d4..f1b3cd6f 100644 --- a/data/dynos_warps.cpp +++ b/data/dynos_warps.cpp @@ -221,7 +221,7 @@ static void *DynOS_Warp_UpdateWarp(void *aCmd, bool aIsLevelInitDone) { gMarioSpawnInfo->startPos[1] = _Warp[4]; gMarioSpawnInfo->startPos[2] = _Warp[5] + (sDynosWarpSpawnType == MARIO_SPAWN_DOOR_WARP) * 300.0f * coss(_Warp[6]); gMarioSpawnInfo->startAngle[0] = 0; - gMarioSpawnInfo->startAngle[1] = _Warp[6] + (!configCoopCompatibility && gCurrLevelNum == LEVEL_CASTLE_GROUNDS && DynOS_Level_IsVanillaLevel(LEVEL_CASTLE_GROUNDS) ? 0x8000 : 0); + gMarioSpawnInfo->startAngle[1] = _Warp[6] + (gCurrLevelNum == LEVEL_CASTLE_GROUNDS && DynOS_Level_IsVanillaLevel(LEVEL_CASTLE_GROUNDS) ? 0x8000 : 0); gMarioSpawnInfo->startAngle[2] = 0; gMarioSpawnInfo->areaIndex = gCurrAreaIndex; init_mario(); diff --git a/docs/lua/functions-5.md b/docs/lua/functions-5.md index ad01f762..c0bd5f61 100644 --- a/docs/lua/functions-5.md +++ b/docs/lua/functions-5.md @@ -703,24 +703,6 @@
-## [get_coop_compatibility_enabled](#get_coop_compatibility_enabled) - -### Lua Example -`local booleanValue = get_coop_compatibility_enabled()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool get_coop_compatibility_enabled(void);` - -[:arrow_up_small:](#) - -
- ## [get_current_save_file_num](#get_current_save_file_num) ### Lua Example diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 011ee69a..1ae22ed4 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -1634,7 +1634,6 @@ - [djui_popup_create_global](functions-5.md#djui_popup_create_global) - [djui_reset_popup_disabled_override](functions-5.md#djui_reset_popup_disabled_override) - [djui_set_popup_disabled_override](functions-5.md#djui_set_popup_disabled_override) - - [get_coop_compatibility_enabled](functions-5.md#get_coop_compatibility_enabled) - [get_current_save_file_num](functions-5.md#get_current_save_file_num) - [get_date_and_time](functions-5.md#get_date_and_time) - [get_dialog_box_state](functions-5.md#get_dialog_box_state) diff --git a/docs/lua/structs.md b/docs/lua/structs.md index 8228f596..37ba927e 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -1427,7 +1427,6 @@ | ----- | ---- | ------ | | basePath | `string` | read-only | | customBehaviorIndex | `integer` | read-only | -| deluxe | `boolean` | read-only | | description | `string` | read-only | | enabled | `boolean` | read-only | | fileCount | `integer` | read-only | diff --git a/src/game/area.c b/src/game/area.c index 5560652d..643389b1 100644 --- a/src/game/area.c +++ b/src/game/area.c @@ -448,7 +448,7 @@ void render_game(void) { djui_reset_hud_params(); create_dl_ortho_matrix(); djui_gfx_displaylist_begin(); - if (!configCoopCompatibility && gServerSettings.nametags && !gDjuiInMainMenu) { + if (gServerSettings.nametags && !gDjuiInMainMenu) { nametags_render(); } smlua_call_event_on_hud_render_behind(djui_reset_hud_params); diff --git a/src/game/behaviors/recovery_heart.inc.c b/src/game/behaviors/recovery_heart.inc.c index f6f8f04a..5f93a832 100644 --- a/src/game/behaviors/recovery_heart.inc.c +++ b/src/game/behaviors/recovery_heart.inc.c @@ -46,7 +46,7 @@ void bhv_recovery_heart_loop(void) { for (s32 i = 0; i < MAX_PLAYERS; i++) { if (!gMarioStates[i].visibleToEnemies) { continue; } if (!is_player_active(&gMarioStates[i])) { continue; } - if (&gMarioStates[i] == nearestInteractingState || (dist_between_objects(o, gMarioStates[i].marioObj) < 1000 && configCoopCompatibility)) { + if (&gMarioStates[i] == nearestInteractingState) { gMarioStates[i].healCounter += 4; } } diff --git a/src/game/interaction.c b/src/game/interaction.c index 3ddd3ab5..ef1fca3e 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -174,13 +174,9 @@ s16 mario_obj_angle_to_object(struct MarioState *m, struct Object *o) { * Determines Mario's interaction with a given object depending on their proximity, * action, speed, and position. */ -static u32 determine_interaction_internal(struct MarioState *m, struct Object *o, u8 isPVP) { +u32 determine_interaction(struct MarioState *m, struct Object *o) { if (!m || !o) { return 0; } - // when set to false, angle checks apply again. I would just restore the original - // determine_interaction function but this is easier with keeping compatibility - if (!configCoopCompatibility) { isPVP = FALSE; } - u32 interaction = 0; u32 action = m->action; @@ -192,29 +188,28 @@ static u32 determine_interaction_internal(struct MarioState *m, struct Object *o } if (interaction == 0 && action & ACT_FLAG_ATTACKING) { - u32 flags = configCoopCompatibility ? (MARIO_PUNCHING | MARIO_KICKING | MARIO_TRIPPING) : (MARIO_PUNCHING | MARIO_KICKING); + u32 flags = (o->oInteractType & INTERACT_PLAYER) ? (MARIO_PUNCHING | MARIO_KICKING) : (MARIO_PUNCHING | MARIO_KICKING | MARIO_TRIPPING); if (m->flags & flags) { s16 dYawToObject = mario_obj_angle_to_object(m, o) - m->faceAngle[1]; if (m->flags & MARIO_PUNCHING) { // 120 degrees total, or 60 each way - if (isPVP || (-0x2AAA <= dYawToObject && dYawToObject <= 0x2AAA)) { + if (-0x2AAA <= dYawToObject && dYawToObject <= 0x2AAA) { interaction = INT_PUNCH; } } if (m->flags & MARIO_KICKING) { // 120 degrees total, or 60 each way - if (isPVP || (-0x2AAA <= dYawToObject && dYawToObject <= 0x2AAA)) { + if (-0x2AAA <= dYawToObject && dYawToObject <= 0x2AAA) { interaction = INT_KICK; } } - if (m->flags & MARIO_TRIPPING && configCoopCompatibility) { + if (m->flags & MARIO_TRIPPING) { // 180 degrees total, or 90 each way if (-0x4000 <= dYawToObject && dYawToObject <= 0x4000) { interaction = INT_TRIP; } } - } else if (action == ACT_GROUND_POUND) { if (m->vel[1] < 0.0f) { interaction = INT_GROUND_POUND; @@ -266,14 +261,6 @@ static u32 determine_interaction_internal(struct MarioState *m, struct Object *o return interaction; } -u32 determine_interaction(struct MarioState *m, struct Object *o) { - return determine_interaction_internal(m, o, FALSE); -} - -u32 determine_interaction_pvp(struct MarioState *m, struct Object *o) { - return determine_interaction_internal(m, o, TRUE); -} - /** * Sets the interaction types for INT_STATUS_INTERACTED, INT_STATUS_WAS_ATTACKED */ @@ -1334,9 +1321,7 @@ static u8 resolve_player_collision(struct MarioState* m, struct MarioState* m2) // bounce u32 interaction = determine_interaction(m, m2->marioObj); - f32 aboveFloor = m2->pos[1] - m2->floorHeight; - bool aboveFloorCheck = configCoopCompatibility ? (aboveFloor < 1) : true; - if ((interaction & INT_HIT_FROM_ABOVE) && aboveFloorCheck) { + if (interaction & INT_HIT_FROM_ABOVE) { m2->bounceSquishTimer = max(m2->bounceSquishTimer, 4); f32 velY; @@ -1489,12 +1474,12 @@ u32 interact_player_pvp(struct MarioState* attacker, struct MarioState* victim) } // see if it was an attack - u32 interaction = determine_interaction_pvp(attacker, cVictim->marioObj); + u32 interaction = determine_interaction(attacker, cVictim->marioObj); if (!(interaction & INT_ANY_ATTACK) || (interaction & INT_HIT_FROM_ABOVE) || !passes_pvp_interaction_checks(attacker, cVictim)) { return FALSE; } - // call the lua hook + // call the Lua hook bool allow = true; smlua_call_event_hooks_mario_params_ret_bool(HOOK_ALLOW_PVP_ATTACK, attacker, cVictim, &allow); if (!allow) { diff --git a/src/game/object_collision.c b/src/game/object_collision.c index c939e67c..4fa478b2 100644 --- a/src/game/object_collision.c +++ b/src/game/object_collision.c @@ -38,7 +38,7 @@ int detect_player_hitbox_overlap(struct MarioState* local, struct MarioState* re f32 dx = aTorso[0] - bTorso[0]; UNUSED f32 sp30 = sp3C - sp38; f32 dz = aTorso[2] - bTorso[2]; - f32 collisionRadius = (a->hitboxRadius + b->hitboxRadius) * (configCoopCompatibility ? 2.25f : 1.6f); // 1.5f before + f32 collisionRadius = (a->hitboxRadius + b->hitboxRadius) * 1.6f; // slightly increased from 1.5f for the sake of it f32 distance = sqrtf(dx * dx + dz * dz); if (collisionRadius * scale > distance) { diff --git a/src/pc/configfile.c b/src/pc/configfile.c index cd7c71f7..688b3cf8 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -164,7 +164,6 @@ bool configFadeoutDistantSounds = false; unsigned int configDjuiTheme = DJUI_THEME_DARK; bool configDjuiThemeCenter = true; unsigned int configDjuiScale = 0; -bool configCoopCompatibility = false; bool configGlobalPlayerModels = true; char configLastVersion[MAX_CONFIG_STRING] = ""; @@ -262,7 +261,6 @@ static const struct ConfigOption options[] = { {.name = "coop_custom_palette_skin", .type = CONFIG_TYPE_COLOR , .colorValue = &configCustomPalette.parts[SKIN]}, {.name = "coop_custom_palette_cap", .type = CONFIG_TYPE_COLOR , .colorValue = &configCustomPalette.parts[CAP]}, {.name = "coop_stay_in_level_after_star", .type = CONFIG_TYPE_UINT , .uintValue = &configStayInLevelAfterStar}, - {.name = "coop_compatibility", .type = CONFIG_TYPE_BOOL , .boolValue = &configCoopCompatibility}, {.name = "coopdx_global_player_models", .type = CONFIG_TYPE_BOOL , .boolValue = &configGlobalPlayerModels}, {.name = "disable_popups", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisablePopups}, {.name = "lua_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configLuaProfiler}, diff --git a/src/pc/configfile.h b/src/pc/configfile.h index 85b05885..231306d9 100644 --- a/src/pc/configfile.h +++ b/src/pc/configfile.h @@ -121,7 +121,6 @@ extern bool configFadeoutDistantSounds; extern unsigned int configDjuiTheme; extern bool configDjuiThemeCenter; extern unsigned int configDjuiScale; -extern bool configCoopCompatibility; extern bool configGlobalPlayerModels; extern char configLastVersion[]; diff --git a/src/pc/discord/discord.c b/src/pc/discord/discord.c index 6c386f2f..431637e2 100644 --- a/src/pc/discord/discord.c +++ b/src/pc/discord/discord.c @@ -13,7 +13,6 @@ #define MAX_LAUNCH_CMD (MAX_PATH + 12) -#define APPLICATION_ID_COOP 752700005210390568 #define APPLICATION_ID_COOPDX 1159627283506679839 struct DiscordApplication app = { 0 }; @@ -128,7 +127,7 @@ static void discord_initialize(void) { // set up discord params struct DiscordCreateParams params = { 0 }; DiscordCreateParamsSetDefault(¶ms); - params.client_id = configCoopCompatibility ? APPLICATION_ID_COOP : APPLICATION_ID_COOPDX; // you have to have activity status on if you don't want discord to prompt you to authorize on every boot + params.client_id = APPLICATION_ID_COOPDX; params.flags = DiscordCreateFlags_NoRequireDiscord; params.event_data = &app; params.user_events = discord_user_initialize(); diff --git a/src/pc/djui/djui_panel_host_settings.c b/src/pc/djui/djui_panel_host_settings.c index ee4a6d14..7dd6ab5e 100644 --- a/src/pc/djui/djui_panel_host_settings.c +++ b/src/pc/djui/djui_panel_host_settings.c @@ -60,12 +60,10 @@ void djui_panel_host_settings_create(struct DjuiBase* caller) { djui_checkbox_create(body, DLANG(HOST_SETTINGS, SKIP_INTRO_CUTSCENE), &configSkipIntro, NULL); djui_checkbox_create(body, DLANG(HOST_SETTINGS, BUBBLE_ON_DEATH), &configBubbleDeath, NULL); - struct DjuiCheckbox* checkbox = djui_checkbox_create(body, DLANG(HOST_SETTINGS, NAMETAGS), &configNametags, NULL); - djui_base_set_enabled(&checkbox->base, !configCoopCompatibility); + djui_checkbox_create(body, DLANG(HOST_SETTINGS, NAMETAGS), &configNametags, NULL); char* bChoices[3] = { DLANG(HOST_SETTINGS, BOUNCY_BOUNDS_OFF), DLANG(HOST_SETTINGS, BOUNCY_BOUNDS_ON), DLANG(HOST_SETTINGS, BOUNCY_BOUNDS_ON_CAP) }; - struct DjuiSelectionbox* selectionbox = djui_selectionbox_create(body, DLANG(HOST_SETTINGS, BOUNCY_LEVEL_BOUNDS), bChoices, 3, &configBouncyLevelBounds, NULL); - djui_base_set_enabled(&selectionbox->base, !configCoopCompatibility); + djui_selectionbox_create(body, DLANG(HOST_SETTINGS, BOUNCY_LEVEL_BOUNDS), bChoices, 3, &configBouncyLevelBounds, NULL); struct DjuiRect* rect1 = djui_rect_container_create(body, 32); { diff --git a/src/pc/djui/djui_panel_join.c b/src/pc/djui/djui_panel_join.c index 2d57ee7c..66360d23 100644 --- a/src/pc/djui/djui_panel_join.c +++ b/src/pc/djui/djui_panel_join.c @@ -33,9 +33,6 @@ void djui_panel_join_create(struct DjuiBase* caller) { djui_button_create(body, DLANG(JOIN, PUBLIC_LOBBIES), DJUI_BUTTON_STYLE_NORMAL, djui_panel_join_public_lobbies); djui_button_create(body, DLANG(JOIN, PRIVATE_LOBBIES), DJUI_BUTTON_STYLE_NORMAL, djui_panel_join_private_create); djui_button_create(body, DLANG(JOIN, DIRECT), DJUI_BUTTON_STYLE_NORMAL, djui_panel_join_direct_create); - if (gDjuiInMainMenu) { - djui_checkbox_create(body, DLANG(MISC, COOP_COMPATIBILITY), &configCoopCompatibility, djui_panel_compatibility_checkbox_on_value_change); - } djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back); } diff --git a/src/pc/djui/djui_panel_join_direct.c b/src/pc/djui/djui_panel_join_direct.c index 485b2e1f..1bc0c534 100644 --- a/src/pc/djui/djui_panel_join_direct.c +++ b/src/pc/djui/djui_panel_join_direct.c @@ -18,13 +18,6 @@ #endif static struct DjuiInputbox* sInputboxIp = NULL; -#ifndef COOPNET -static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct DjuiBase* caller) { -#ifdef DISCORD_SDK - gDiscordInitialized = false; -#endif -} -#endif static bool djui_panel_join_direct_ip_parse_numbers(char** msg) { int num = 0; @@ -182,12 +175,6 @@ void djui_panel_join_direct_create(struct DjuiBase* caller) { sInputboxIp = inputbox1; djui_panel_join_direct_ip_text_set(inputbox1); -#ifndef COOPNET - if (gDjuiInMainMenu) { - djui_checkbox_create(body, DLANG(MISC, COOP_COMPATIBILITY), &configCoopCompatibility, djui_panel_compatibility_checkbox_on_value_change); - } -#endif - struct DjuiRect* rect2 = djui_rect_container_create(body, 64); { struct DjuiButton* button1 = djui_button_create(&rect2->base, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back); diff --git a/src/pc/djui/djui_panel_misc.c b/src/pc/djui/djui_panel_misc.c index 0f236b82..c3159e93 100644 --- a/src/pc/djui/djui_panel_misc.c +++ b/src/pc/djui/djui_panel_misc.c @@ -46,9 +46,6 @@ void djui_panel_misc_create(struct DjuiBase* caller) { { djui_checkbox_create(body, DLANG(MISC, DISABLE_POPUPS), &configDisablePopups, NULL); - if (gDjuiInMainMenu) { - djui_checkbox_create(body, DLANG(MISC, COOP_COMPATIBILITY), &configCoopCompatibility, djui_panel_compatibility_checkbox_on_value_change); - } #ifndef DEVELOPMENT djui_checkbox_create(body, DLANG(MISC, LUA_PROFILER), &configLuaProfiler, NULL); #endif diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index bf6d8ed4..8d69f2aa 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -1177,11 +1177,10 @@ static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = { { "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE }, }; -#define LUA_MOD_FIELD_COUNT 14 +#define LUA_MOD_FIELD_COUNT 13 static struct LuaObjectField sModFields[LUA_MOD_FIELD_COUNT] = { { "basePath", LVT_STRING, offsetof(struct Mod, basePath), true, LOT_NONE }, { "customBehaviorIndex", LVT_U8, offsetof(struct Mod, customBehaviorIndex), true, LOT_NONE }, - { "deluxe", LVT_BOOL, offsetof(struct Mod, deluxe), true, LOT_NONE }, { "description", LVT_STRING_P, offsetof(struct Mod, description), true, LOT_NONE }, { "enabled", LVT_BOOL, offsetof(struct Mod, enabled), true, LOT_NONE }, { "fileCount", LVT_U16, offsetof(struct Mod, fileCount), true, LOT_NONE }, diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 6cc851b4..936bf205 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -356,6 +356,10 @@ char gSmluaConstants[] = "" "-- legacy font --\n" "-----------------\n" "FONT_TINY = -1\n" +"----------------------\n" +"-- legacy functions --\n" +"----------------------\n" +"function get_coop_compatibility_enabled() return false end\n" "INSTANT_WARP_INDEX_START = 0x00\n" "INSTANT_WARP_INDEX_STOP = 0x04\n" "MAX_AREAS = 16\n" diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 7ea19bba..866cf8c2 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -28771,21 +28771,6 @@ int smlua_func_djui_set_popup_disabled_override(lua_State* L) { return 1; } -int smlua_func_get_coop_compatibility_enabled(UNUSED lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 0) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_coop_compatibility_enabled", 0, top); - return 0; - } - - - lua_pushboolean(L, get_coop_compatibility_enabled()); - - return 1; -} - int smlua_func_get_current_save_file_num(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -33002,7 +32987,6 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "djui_popup_create_global", smlua_func_djui_popup_create_global); smlua_bind_function(L, "djui_reset_popup_disabled_override", smlua_func_djui_reset_popup_disabled_override); smlua_bind_function(L, "djui_set_popup_disabled_override", smlua_func_djui_set_popup_disabled_override); - smlua_bind_function(L, "get_coop_compatibility_enabled", smlua_func_get_coop_compatibility_enabled); smlua_bind_function(L, "get_current_save_file_num", smlua_func_get_current_save_file_num); smlua_bind_function(L, "get_date_and_time", smlua_func_get_date_and_time); smlua_bind_function(L, "get_dialog_box_state", smlua_func_get_dialog_box_state); diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c index 340fc69a..db4bd4d9 100644 --- a/src/pc/lua/utils/smlua_misc_utils.c +++ b/src/pc/lua/utils/smlua_misc_utils.c @@ -629,12 +629,6 @@ u32 get_global_timer(void) { /// -bool get_coop_compatibility_enabled(void) { - return configCoopCompatibility; -} - -/// - void set_window_title(const char* title) { WAPI.set_window_title(title); } diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h index f83b032b..2e343651 100644 --- a/src/pc/lua/utils/smlua_misc_utils.h +++ b/src/pc/lua/utils/smlua_misc_utils.h @@ -158,8 +158,6 @@ void set_override_envfx(s32 envfx); u32 get_global_timer(void); -bool get_coop_compatibility_enabled(void); - void set_window_title(const char* title); void reset_window_title(void); diff --git a/src/pc/mods/mod.c b/src/pc/mods/mod.c index 62d72f57..526b5949 100644 --- a/src/pc/mods/mod.c +++ b/src/pc/mods/mod.c @@ -432,8 +432,6 @@ static void mod_extract_fields(struct Mod* mod) { if (snprintf(mod->description, MOD_DESCRIPTION_MAX_LENGTH, "%s", extracted) < 0) { LOG_INFO("Truncated mod description field '%s'", mod->description); } - } else if (!mod->deluxe && (extracted = extract_lua_field("-- deluxe:", buffer))) { - mod->deluxe = !strcmp(extracted, "true"); } else if (!mod->pausable && (extracted = extract_lua_field("-- pausable:", buffer))) { mod->pausable = !strcmp(extracted, "true"); } diff --git a/src/pc/mods/mod.h b/src/pc/mods/mod.h index 927fdff9..56f49bb0 100644 --- a/src/pc/mods/mod.h +++ b/src/pc/mods/mod.h @@ -34,7 +34,6 @@ struct Mod { bool enabled; bool selectable; bool renderBehindHud; - bool deluxe; bool pausable; size_t size; u8 customBehaviorIndex; diff --git a/src/pc/mods/mods_utils.c b/src/pc/mods/mods_utils.c index e2bf409c..7b61d250 100644 --- a/src/pc/mods/mods_utils.c +++ b/src/pc/mods/mods_utils.c @@ -25,16 +25,6 @@ void mods_size_enforce(struct Mods* mods) { } } -void mods_deluxe_enforce(struct Mods* mods) { - for (int i = 0; i < mods->entryCount; i++) { - struct Mod* mod = mods->entries[i]; - if (mod->deluxe && configCoopCompatibility) { - mod->enabled = false; - mod->selectable = false; - } - } -} - static bool mods_incompatible_match(struct Mod* a, struct Mod* b) { if (a->incompatible == NULL || b->incompatible == NULL) { return false; @@ -89,7 +79,6 @@ void mods_update_selectable(void) { } mods_size_enforce(&gLocalMods); - mods_deluxe_enforce(&gLocalMods); } void mods_delete_folder(char* path) { diff --git a/src/pc/network/network.c b/src/pc/network/network.c index 16f7f796..979319e8 100644 --- a/src/pc/network/network.c +++ b/src/pc/network/network.c @@ -115,7 +115,7 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) { // set server settings gServerSettings.playerInteractions = configPlayerInteraction; - gServerSettings.bouncyLevelBounds = configCoopCompatibility ? 0 : configBouncyLevelBounds; + gServerSettings.bouncyLevelBounds = configBouncyLevelBounds; gServerSettings.playerKnockbackStrength = configPlayerKnockbackStrength; gServerSettings.stayInLevelAfterStar = configStayInLevelAfterStar; gServerSettings.skipIntro = gCLIOpts.skipIntro ? TRUE : configSkipIntro; @@ -123,7 +123,7 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) { gServerSettings.bubbleDeath = configBubbleDeath; gServerSettings.enablePlayersInLevelDisplay = TRUE; gServerSettings.enablePlayerList = TRUE; - gServerSettings.nametags = configCoopCompatibility ? FALSE : configNametags; + gServerSettings.nametags = configNametags; gServerSettings.maxPlayers = configAmountofPlayers; #if defined(RAPI_DUMMY) || defined(WAPI_DUMMY) gServerSettings.headlessServer = (inNetworkType == NT_SERVER); diff --git a/src/pc/network/network_player.c b/src/pc/network/network_player.c index fcc696b6..9a451e80 100644 --- a/src/pc/network/network_player.c +++ b/src/pc/network/network_player.c @@ -262,7 +262,7 @@ u8 network_player_connected(enum NetworkPlayerType type, u8 globalIndex, u8 mode np->type = type; np->localIndex = localIndex; np->globalIndex = globalIndex; - np->ping = configCoopCompatibility ? 600 : 50; + np->ping = 50; if ((type != NPT_LOCAL) && (gNetworkType == NT_SERVER || type == NPT_SERVER)) { gNetworkSystem->save_id(localIndex, 0); } network_player_set_description(np, NULL, 0, 0, 0, 0); diff --git a/src/pc/network/packets/packet_join.c b/src/pc/network/packets/packet_join.c index 4c865ccf..e26f0cbb 100644 --- a/src/pc/network/packets/packet_join.c +++ b/src/pc/network/packets/packet_join.c @@ -111,14 +111,14 @@ void network_send_join(struct Packet* joinRequestPacket) { packet_write(&p, &globalIndex, sizeof(u8)); packet_write(&p, &gCurrSaveFileNum, sizeof(s16)); packet_write(&p, &gServerSettings.playerInteractions, sizeof(u8)); - if (!configCoopCompatibility) { packet_write(&p, &gServerSettings.bouncyLevelBounds, sizeof(u8)); } + packet_write(&p, &gServerSettings.bouncyLevelBounds, sizeof(u8)); packet_write(&p, &gServerSettings.playerKnockbackStrength, sizeof(u8)); packet_write(&p, &gServerSettings.stayInLevelAfterStar, sizeof(u8)); packet_write(&p, &gServerSettings.skipIntro, sizeof(u8)); packet_write(&p, &gServerSettings.enableCheats, sizeof(u8)); packet_write(&p, &gServerSettings.bubbleDeath, sizeof(u8)); packet_write(&p, &gServerSettings.headlessServer, sizeof(u8)); - if (!configCoopCompatibility) { packet_write(&p, &gServerSettings.nametags, sizeof(u8)); } + packet_write(&p, &gServerSettings.nametags, sizeof(u8)); packet_write(&p, &gServerSettings.maxPlayers, sizeof(u8)); packet_write(&p, eeprom, sizeof(u8) * 512); @@ -163,22 +163,14 @@ void network_receive_join(struct Packet* p) { packet_read(p, &myGlobalIndex, sizeof(u8)); packet_read(p, &gCurrSaveFileNum, sizeof(s16)); packet_read(p, &gServerSettings.playerInteractions, sizeof(u8)); - if (!configCoopCompatibility) { - packet_read(p, &gServerSettings.bouncyLevelBounds, sizeof(u8)); - } else { - gServerSettings.bouncyLevelBounds = BOUNCY_LEVEL_BOUNDS_OFF; - } + packet_read(p, &gServerSettings.bouncyLevelBounds, sizeof(u8)); packet_read(p, &gServerSettings.playerKnockbackStrength, sizeof(u8)); packet_read(p, &gServerSettings.stayInLevelAfterStar, sizeof(u8)); packet_read(p, &gServerSettings.skipIntro, sizeof(u8)); packet_read(p, &gServerSettings.enableCheats, sizeof(u8)); packet_read(p, &gServerSettings.bubbleDeath, sizeof(u8)); packet_read(p, &gServerSettings.headlessServer, sizeof(u8)); - if (!configCoopCompatibility) { - packet_read(p, &gServerSettings.nametags, sizeof(u8)); - } else { - gServerSettings.nametags = false; - } + packet_read(p, &gServerSettings.nametags, sizeof(u8)); packet_read(p, &gServerSettings.maxPlayers, sizeof(u8)); packet_read(p, eeprom, sizeof(u8) * 512); diff --git a/src/pc/network/packets/packet_mod_list.c b/src/pc/network/packets/packet_mod_list.c index 0315e6dc..b3e1bca5 100644 --- a/src/pc/network/packets/packet_mod_list.c +++ b/src/pc/network/packets/packet_mod_list.c @@ -84,10 +84,7 @@ void network_send_mod_list(void) { packet_write(&p, mod->relativePath, sizeof(u8) * relativePathLength); packet_write(&p, &modSize, sizeof(u64)); packet_write(&p, &mod->isDirectory, sizeof(u8)); - if (!configCoopCompatibility) { - packet_write(&p, &mod->deluxe, sizeof(u8)); - packet_write(&p, &mod->pausable, sizeof(u8)); - } + packet_write(&p, &mod->pausable, sizeof(u8)); packet_write(&p, &mod->fileCount, sizeof(u16)); network_send_to(0, &p); LOG_INFO(" '%s': %llu", mod->name, (u64)mod->size); @@ -226,10 +223,7 @@ void network_receive_mod_list_entry(struct Packet* p) { packet_read(p, mod->relativePath, relativePathLength * sizeof(u8)); packet_read(p, &mod->size, sizeof(u64)); packet_read(p, &mod->isDirectory, sizeof(u8)); - if (!configCoopCompatibility) { - packet_read(p, &mod->deluxe, sizeof(u8)); - packet_read(p, &mod->pausable, sizeof(u8)); - } + packet_read(p, &mod->pausable, sizeof(u8)); normalize_path(mod->relativePath); LOG_INFO(" '%s': %llu", mod->name, (u64)mod->size);