Small fixes

This commit is contained in:
Agent X 2024-01-01 18:51:57 -05:00
parent f8d15e4ff8
commit 4aa061e28d
5 changed files with 10 additions and 18 deletions

View File

@ -5,8 +5,6 @@ if SM64COOPDX_VERSION == nil then return end
function on_level_init() function on_level_init()
if gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_RAINBOW then if gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_RAINBOW then
set_lighting_dir(1, -10) set_lighting_dir(1, -10)
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_SPACE then
set_lighting_dir(1, -10)
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_CITADEL then elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_CITADEL then
set_lighting_dir(1, -10) set_lighting_dir(1, -10)
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_FORTS then elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_FORTS then
@ -15,9 +13,7 @@ function on_level_init()
set_lighting_dir(1, -10) set_lighting_dir(1, -10)
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_PILLARS then elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_PILLARS then
set_lighting_dir(1, -10) set_lighting_dir(1, -10)
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_SKY_BEACH then else
set_lighting_dir(1, 0)
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_SPIRE then
set_lighting_dir(1, 0) set_lighting_dir(1, 0)
end end

View File

@ -96,6 +96,7 @@ void djui_init_late(void) {
djui_panel_language_create(NULL); djui_panel_language_create(NULL);
} }
if (strcmp(configLastVersion, SM64COOPDX_VERSION)) { if (strcmp(configLastVersion, SM64COOPDX_VERSION)) {
strncpy(configLastVersion, SM64COOPDX_VERSION, MAX_CONFIG_STRING);
djui_panel_changelog_create(NULL); djui_panel_changelog_create(NULL);
} }
//djui_panel_debug_create(); //djui_panel_debug_create();

View File

@ -4,11 +4,6 @@
static char sChangelog[1200]; static char sChangelog[1200];
void djui_panel_changelog_back(UNUSED struct DjuiBase* caller) {
strncpy(configLastVersion, SM64COOPDX_VERSION, MAX_CONFIG_STRING);
djui_panel_back();
}
void djui_panel_changelog_create(struct DjuiBase* caller) { void djui_panel_changelog_create(struct DjuiBase* caller) {
struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CHANGELOG, CHANGELOG_TITLE)); struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CHANGELOG, CHANGELOG_TITLE));
struct DjuiBase* body = djui_three_panel_get_body(panel); struct DjuiBase* body = djui_three_panel_get_body(panel);
@ -51,7 +46,7 @@ Updated Day Night Cycle DX and Gun Mod DX"
djui_text_set_drop_shadow(text, 64, 64, 64, 100); djui_text_set_drop_shadow(text, 64, 64, 64, 100);
djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_TOP); djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_TOP);
djui_button_create(body, "OK", DJUI_BUTTON_STYLE_BACK, djui_panel_changelog_back); djui_button_create(body, "OK", DJUI_BUTTON_STYLE_BACK, djui_panel_back);
} }
djui_panel_add(caller, panel, NULL); djui_panel_add(caller, panel, NULL);

View File

@ -1074,17 +1074,17 @@ static struct LuaObjectField sMarioBodyStateFields[LUA_MARIO_BODY_STATE_FIELD_CO
{ "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S }, { "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S },
{ "headPos", LVT_COBJECT, offsetof(struct MarioBodyState, headPos), true, LOT_VEC3F }, { "headPos", LVT_COBJECT, offsetof(struct MarioBodyState, headPos), true, LOT_VEC3F },
{ "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F }, { "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F },
{ "lightB", LVT_U8, offsetof(struct MarioBodyState, lightB), false, LOT_NONE }, { "lightB", LVT_U16, offsetof(struct MarioBodyState, lightB), false, LOT_NONE },
{ "lightG", LVT_U8, offsetof(struct MarioBodyState, lightG), false, LOT_NONE }, { "lightG", LVT_U16, offsetof(struct MarioBodyState, lightG), false, LOT_NONE },
{ "lightR", LVT_U8, offsetof(struct MarioBodyState, lightR), false, LOT_NONE }, { "lightR", LVT_U16, offsetof(struct MarioBodyState, lightR), false, LOT_NONE },
{ "lightingDirX", LVT_F32, offsetof(struct MarioBodyState, lightingDirX), false, LOT_NONE }, { "lightingDirX", LVT_F32, offsetof(struct MarioBodyState, lightingDirX), false, LOT_NONE },
{ "lightingDirY", LVT_F32, offsetof(struct MarioBodyState, lightingDirY), false, LOT_NONE }, { "lightingDirY", LVT_F32, offsetof(struct MarioBodyState, lightingDirY), false, LOT_NONE },
{ "lightingDirZ", LVT_F32, offsetof(struct MarioBodyState, lightingDirZ), false, LOT_NONE }, { "lightingDirZ", LVT_F32, offsetof(struct MarioBodyState, lightingDirZ), false, LOT_NONE },
{ "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE }, { "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE },
{ "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE }, { "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE },
{ "shadeB", LVT_U8, offsetof(struct MarioBodyState, shadeB), false, LOT_NONE }, { "shadeB", LVT_U16, offsetof(struct MarioBodyState, shadeB), false, LOT_NONE },
{ "shadeG", LVT_U8, offsetof(struct MarioBodyState, shadeG), false, LOT_NONE }, { "shadeG", LVT_U16, offsetof(struct MarioBodyState, shadeG), false, LOT_NONE },
{ "shadeR", LVT_U8, offsetof(struct MarioBodyState, shadeR), false, LOT_NONE }, { "shadeR", LVT_U16, offsetof(struct MarioBodyState, shadeR), false, LOT_NONE },
{ "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S }, { "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S },
{ "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F }, { "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F },
{ "updateTorsoTime", LVT_U32, offsetof(struct MarioBodyState, updateTorsoTime), true, LOT_NONE }, { "updateTorsoTime", LVT_U32, offsetof(struct MarioBodyState, updateTorsoTime), true, LOT_NONE },

View File

@ -262,7 +262,7 @@ u8 network_player_connected(enum NetworkPlayerType type, u8 globalIndex, u8 mode
np->type = type; np->type = type;
np->localIndex = localIndex; np->localIndex = localIndex;
np->globalIndex = globalIndex; np->globalIndex = globalIndex;
np->ping = 50; np->ping = configCoopCompatibility ? 600 : 50;
if ((type != NPT_LOCAL) && (gNetworkType == NT_SERVER || type == NPT_SERVER)) { gNetworkSystem->save_id(localIndex, 0); } 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); network_player_set_description(np, NULL, 0, 0, 0, 0);