mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Remove sm64ex-coop compatibility
This commit is contained in:
parent
d2842becdb
commit
de1e24b7b9
31 changed files with 44 additions and 145 deletions
|
@ -401,3 +401,10 @@ COURSE_MIN = 1
|
|||
-----------------
|
||||
|
||||
FONT_TINY = -1
|
||||
|
||||
|
||||
----------------------
|
||||
-- legacy functions --
|
||||
----------------------
|
||||
|
||||
function get_coop_compatibility_enabled() return false end
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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()
|
||||
-- ...
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -703,24 +703,6 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [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:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [get_current_save_file_num](#get_current_save_file_num)
|
||||
|
||||
### Lua Example
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 |
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -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[];
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 },
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ struct Mod {
|
|||
bool enabled;
|
||||
bool selectable;
|
||||
bool renderBehindHud;
|
||||
bool deluxe;
|
||||
bool pausable;
|
||||
size_t size;
|
||||
u8 customBehaviorIndex;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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.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.maxPlayers, sizeof(u8));
|
||||
packet_read(p, eeprom, sizeof(u8) * 512);
|
||||
|
||||
|
|
|
@ -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->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));
|
||||
}
|
||||
normalize_path(mod->relativePath);
|
||||
LOG_INFO(" '%s': %llu", mod->name, (u64)mod->size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue