give clients access to mod incompatible tags
And fix a crash when warping to the cake end picture
This commit is contained in:
parent
64ac00253f
commit
977405c8c3
|
@ -48,7 +48,7 @@ static void ScanPacksFolder(SysPath _DynosPacksFolder) {
|
||||||
// If pack folder exists, add it to the pack list
|
// If pack folder exists, add it to the pack list
|
||||||
SysPath _PackFolder = fstring("%s/%s", _DynosPacksFolder.c_str(), _DynosPacksEnt->d_name);
|
SysPath _PackFolder = fstring("%s/%s", _DynosPacksFolder.c_str(), _DynosPacksEnt->d_name);
|
||||||
if (fs_sys_dir_exists(_PackFolder.c_str())) {
|
if (fs_sys_dir_exists(_PackFolder.c_str())) {
|
||||||
struct PackData* _Pack = DynOS_Pack_Add(_PackFolder);
|
DynOS_Pack_Add(_PackFolder);
|
||||||
DynOS_Actor_GeneratePack(_PackFolder);
|
DynOS_Actor_GeneratePack(_PackFolder);
|
||||||
DynOS_Tex_GeneratePack(_PackFolder, _PackFolder, false);
|
DynOS_Tex_GeneratePack(_PackFolder, _PackFolder, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "pc/lua/smlua_hooks.h"
|
#include "pc/lua/smlua_hooks.h"
|
||||||
#include "pc/utils/misc.h"
|
#include "pc/utils/misc.h"
|
||||||
#include "pc/debuglog.h"
|
#include "pc/debuglog.h"
|
||||||
|
#include "include/course_table.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file contains the code that processes the scene graph for rendering.
|
* This file contains the code that processes the scene graph for rendering.
|
||||||
|
@ -282,7 +283,7 @@ void patch_mtx_interpolated(f32 delta) {
|
||||||
// calculate outside of for loop to reduce overhead
|
// calculate outside of for loop to reduce overhead
|
||||||
// technically this is improper use of mtxf functions, but coop doesn't target N64
|
// technically this is improper use of mtxf functions, but coop doesn't target N64
|
||||||
bool translateCamSpace = (gMtxTblSize > 0) && sCameraNode && (sCameraNode->matrixPtr != NULL) && (sCameraNode->matrixPtrPrev != NULL);
|
bool translateCamSpace = (gMtxTblSize > 0) && sCameraNode && (sCameraNode->matrixPtr != NULL) && (sCameraNode->matrixPtrPrev != NULL);
|
||||||
if (translateCamSpace) {
|
if (translateCamSpace && gCurrCourseNum != COURSE_CAKE_END) {
|
||||||
mtxf_inverse(camTranfInv.m, *sCameraNode->matrixPtr);
|
mtxf_inverse(camTranfInv.m, *sCameraNode->matrixPtr);
|
||||||
mtxf_inverse(prevCamTranfInv.m, *sCameraNode->matrixPtrPrev);
|
mtxf_inverse(prevCamTranfInv.m, *sCameraNode->matrixPtrPrev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,9 @@ void network_send_mod_list(void) {
|
||||||
u16 nameLength = strlen(mod->name);
|
u16 nameLength = strlen(mod->name);
|
||||||
if (nameLength > 31) { nameLength = 31; }
|
if (nameLength > 31) { nameLength = 31; }
|
||||||
|
|
||||||
|
u16 incompatibleLength = strlen(mod->incompatible);
|
||||||
|
if (incompatibleLength > 31) { incompatibleLength = 31; }
|
||||||
|
|
||||||
u16 relativePathLength = strlen(mod->relativePath);
|
u16 relativePathLength = strlen(mod->relativePath);
|
||||||
u64 modSize = mod->size;
|
u64 modSize = mod->size;
|
||||||
|
|
||||||
|
@ -60,6 +63,8 @@ void network_send_mod_list(void) {
|
||||||
packet_write(&p, &i, sizeof(u16));
|
packet_write(&p, &i, sizeof(u16));
|
||||||
packet_write(&p, &nameLength, sizeof(u16));
|
packet_write(&p, &nameLength, sizeof(u16));
|
||||||
packet_write(&p, mod->name, sizeof(u8) * nameLength);
|
packet_write(&p, mod->name, sizeof(u8) * nameLength);
|
||||||
|
packet_write(&p, &incompatibleLength, sizeof(u16));
|
||||||
|
packet_write(&p, mod->incompatible, sizeof(u8) * incompatibleLength);
|
||||||
packet_write(&p, &relativePathLength, sizeof(u16));
|
packet_write(&p, &relativePathLength, sizeof(u16));
|
||||||
packet_write(&p, mod->relativePath, sizeof(u8) * relativePathLength);
|
packet_write(&p, mod->relativePath, sizeof(u8) * relativePathLength);
|
||||||
packet_write(&p, &modSize, sizeof(u64));
|
packet_write(&p, &modSize, sizeof(u64));
|
||||||
|
@ -179,6 +184,19 @@ void network_receive_mod_list_entry(struct Packet* p) {
|
||||||
packet_read(p, name, nameLength * sizeof(u8));
|
packet_read(p, name, nameLength * sizeof(u8));
|
||||||
mod->name = strdup(name);
|
mod->name = strdup(name);
|
||||||
|
|
||||||
|
// get incompatible length
|
||||||
|
u16 incompatibleLength = 0;
|
||||||
|
packet_read(p, &incompatibleLength, sizeof(u16));
|
||||||
|
if (incompatibleLength > 31) {
|
||||||
|
LOG_ERROR("Received name with invalid length!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get incompatible
|
||||||
|
char incompatible[32] = { 0 };
|
||||||
|
packet_read(p, incompatible, incompatibleLength * sizeof(u8));
|
||||||
|
mod->incompatible = strdup(incompatible);
|
||||||
|
|
||||||
// get other fields
|
// get other fields
|
||||||
u16 relativePathLength = 0;
|
u16 relativePathLength = 0;
|
||||||
packet_read(p, &relativePathLength, sizeof(u16));
|
packet_read(p, &relativePathLength, sizeof(u16));
|
||||||
|
|
Loading…
Reference in New Issue