Quick fixes for test

This commit is contained in:
MysterD 2022-04-10 10:11:13 -07:00
parent d7e57003f1
commit ef4a83dc88
9 changed files with 46 additions and 12 deletions

View File

@ -4376,7 +4376,7 @@ MAX_SYNC_OBJECTS = 256
MAX_SYNC_OBJECT_FIELDS = 64 MAX_SYNC_OBJECT_FIELDS = 64
--- @type integer --- @type integer
PACKET_LENGTH = 2048 PACKET_LENGTH = 3000
--- @type integer --- @type integer
SYNC_DISTANCE_INFINITE = 0 SYNC_DISTANCE_INFINITE = 0

View File

@ -7026,6 +7026,11 @@ function smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m
-- ... -- ...
end end
--- @return nil
function smlua_audio_utils_reset_all()
-- ...
end
--- @param startX number --- @param startX number
--- @param startY number --- @param startY number
--- @param startZ number --- @param startZ number

View File

@ -16,10 +16,10 @@ if [ ! -f "$FILE" ]; then
fi fi
# no debug, direct # no debug, direct
$FILE --server 27015 --configfile sm64config_server.txt & #$FILE --server 27015 --configfile sm64config_server.txt &
sleep 2 #sleep 2
$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt & #$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
exit #exit
# no debug, discord # no debug, discord
#$FILE --discord 2 --configfile sm64config_server.txt & #$FILE --discord 2 --configfile sm64config_server.txt &
@ -27,9 +27,9 @@ exit
#exit #exit
# debug on server # debug on server
#$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt & > /dev/null $FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt & > /dev/null
#$WINPTY cgdb $FILE -ex 'break debug_breakpoint_here' -ex 'run --server 27015 --configfile sm64config_server.txt' -ex 'quit' $WINPTY cgdb $FILE -ex 'break debug_breakpoint_here' -ex 'run --server 27015 --configfile sm64config_server.txt' -ex 'quit'
#exit exit
# debug on client # debug on client
$FILE --server 27015 --configfile sm64config_server.txt & > /dev/null $FILE --server 27015 --configfile sm64config_server.txt & > /dev/null

View File

@ -1304,6 +1304,7 @@
- smlua_audio_utils.h - smlua_audio_utils.h
- [smlua_audio_utils_replace_sequence](#smlua_audio_utils_replace_sequence) - [smlua_audio_utils_replace_sequence](#smlua_audio_utils_replace_sequence)
- [smlua_audio_utils_reset_all](#smlua_audio_utils_reset_all)
<br /> <br />
@ -24584,6 +24585,24 @@ The `reliable` field will ensure that the packet arrives, but should be used spa
<br /> <br />
## [smlua_audio_utils_reset_all](#smlua_audio_utils_reset_all)
### Lua Example
`smlua_audio_utils_reset_all()`
### Parameters
- None
### Returns
- None
### C Prototype
`void smlua_audio_utils_reset_all(void);`
[:arrow_up_small:](#)
<br />
--- ---
# functions from smlua_collision_utils.h # functions from smlua_collision_utils.h

View File

@ -1645,7 +1645,7 @@ char gSmluaConstants[] = ""
"SYNC_DISTANCE_INFINITE = 0\n" "SYNC_DISTANCE_INFINITE = 0\n"
"MAX_SYNC_OBJECTS = 256\n" "MAX_SYNC_OBJECTS = 256\n"
"MAX_SYNC_OBJECT_FIELDS = 64\n" "MAX_SYNC_OBJECT_FIELDS = 64\n"
"PACKET_LENGTH = 2048\n" "PACKET_LENGTH = 3000\n"
"NS_SOCKET = 0\n" "NS_SOCKET = 0\n"
"NS_DISCORD = 1\n" "NS_DISCORD = 1\n"
"PLAYER_INTERACTIONS_NONE = 0\n" "PLAYER_INTERACTIONS_NONE = 0\n"

View File

@ -14637,6 +14637,15 @@ int smlua_func_smlua_audio_utils_replace_sequence(lua_State* L) {
return 1; return 1;
} }
int smlua_func_smlua_audio_utils_reset_all(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
smlua_audio_utils_reset_all();
return 1;
}
///////////////////////////// /////////////////////////////
// smlua_collision_utils.h // // smlua_collision_utils.h //
///////////////////////////// /////////////////////////////
@ -16973,6 +16982,7 @@ void smlua_bind_functions_autogen(void) {
// smlua_audio_utils.h // smlua_audio_utils.h
smlua_bind_function(L, "smlua_audio_utils_replace_sequence", smlua_func_smlua_audio_utils_replace_sequence); smlua_bind_function(L, "smlua_audio_utils_replace_sequence", smlua_func_smlua_audio_utils_replace_sequence);
smlua_bind_function(L, "smlua_audio_utils_reset_all", smlua_func_smlua_audio_utils_reset_all);
// smlua_collision_utils.h // smlua_collision_utils.h
smlua_bind_function(L, "collision_find_surface_on_ray", smlua_func_collision_find_surface_on_ray); smlua_bind_function(L, "collision_find_surface_on_ray", smlua_func_collision_find_surface_on_ray);

View File

@ -22,7 +22,7 @@ extern struct MarioState gMarioStates[];
#define SYNC_DISTANCE_INFINITE 0 #define SYNC_DISTANCE_INFINITE 0
#define MAX_SYNC_OBJECTS 256 // note: increasing this requires code to be rewritten #define MAX_SYNC_OBJECTS 256 // note: increasing this requires code to be rewritten
#define MAX_SYNC_OBJECT_FIELDS 64 #define MAX_SYNC_OBJECT_FIELDS 64
#define PACKET_LENGTH 2048 #define PACKET_LENGTH 3000
#define NETWORKTYPESTR (gNetworkType == NT_CLIENT \ #define NETWORKTYPESTR (gNetworkType == NT_CLIENT \
? "Client" \ ? "Client" \
: (gNetworkType == NT_SERVER ? "Server" : " None ")) \ : (gNetworkType == NT_SERVER ? "Server" : " None ")) \

View File

@ -7,7 +7,7 @@
#include <assert.h> #include <assert.h>
#include <stdbool.h> #include <stdbool.h>
#define PACKET_LENGTH 2048 #define PACKET_LENGTH 3000
#define PACKET_DESTINATION_BROADCAST ((u8)-1) #define PACKET_DESTINATION_BROADCAST ((u8)-1)
struct NetworkPlayer; struct NetworkPlayer;

View File

@ -170,7 +170,7 @@ void network_receive_mod_list(struct Packet* p) {
packet_read(p, &relativePathLength, sizeof(u16)); packet_read(p, &relativePathLength, sizeof(u16));
packet_read(p, file->relativePath, relativePathLength * sizeof(u8)); packet_read(p, file->relativePath, relativePathLength * sizeof(u8));
packet_read(p, &file->size, sizeof(u64)); packet_read(p, &file->size, sizeof(u64));
if (mod->isDirectory && !strstr(file->relativePath, "actors") && !strstr(file->relativePath, "levels")) { if (mod->isDirectory && !strstr(file->relativePath, "actors") && !strstr(file->relativePath, "levels") && !strstr(file->relativePath, "sound")) {
char tmp[SYS_MAX_PATH]; char tmp[SYS_MAX_PATH];
if (snprintf(tmp, SYS_MAX_PATH, "%s-%s", mod->relativePath, file->relativePath) >= 0) { if (snprintf(tmp, SYS_MAX_PATH, "%s-%s", mod->relativePath, file->relativePath) >= 0) {
memcpy(file->relativePath, tmp, strlen(tmp) + 1); memcpy(file->relativePath, tmp, strlen(tmp) + 1);