mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 20:15:17 +00:00
Added last remote object information to crash screen
This commit is contained in:
parent
4254538802
commit
7ff1622745
7 changed files with 16 additions and 6 deletions
|
@ -30,8 +30,10 @@ static std::map<u32, u32> sOverwriteMap;
|
||||||
static u32 find_empty_id() {
|
static u32 find_empty_id() {
|
||||||
u32 id = 256;
|
u32 id = 256;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (id != 0) {
|
||||||
if (sIdMap.count(id) == 0) { return id; }
|
if (sIdMap.count(id) == 0) { return id; }
|
||||||
if (sIdMap[id].size() == 0) { return id; }
|
if (sIdMap[id].size() == 0) { return id; }
|
||||||
|
}
|
||||||
id++;
|
id++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -107,6 +107,7 @@ void apply_platform_displacement(u32 playerIndex, struct Object *platform) {
|
||||||
UNUSED s16 unused2;
|
UNUSED s16 unused2;
|
||||||
UNUSED s16 unused3;
|
UNUSED s16 unused3;
|
||||||
f32 displaceMatrix[4][4];
|
f32 displaceMatrix[4][4];
|
||||||
|
if (!platform) { return; }
|
||||||
|
|
||||||
rotation[0] = platform->oAngleVelPitch;
|
rotation[0] = platform->oAngleVelPitch;
|
||||||
rotation[1] = platform->oAngleVelYaw;
|
rotation[1] = platform->oAngleVelYaw;
|
||||||
|
|
|
@ -26,12 +26,14 @@
|
||||||
#include "pc/mods/mods.h"
|
#include "pc/mods/mods.h"
|
||||||
#include "pc/debuglog.h"
|
#include "pc/debuglog.h"
|
||||||
|
|
||||||
|
char gLastRemoteBhv[256] = "";
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
s32 x, y;
|
s32 x, y;
|
||||||
u8 r, g, b;
|
u8 r, g, b;
|
||||||
char s[128];
|
char s[128];
|
||||||
} CrashHandlerText;
|
} CrashHandlerText;
|
||||||
static CrashHandlerText sCrashHandlerText[128 + 256];
|
static CrashHandlerText sCrashHandlerText[128 + 256 + 4];
|
||||||
|
|
||||||
#define PTR long long unsigned int)(uintptr_t
|
#define PTR long long unsigned int)(uintptr_t
|
||||||
|
|
||||||
|
@ -636,6 +638,7 @@ static void crash_handler(const int signalNum, siginfo_t *info, ucontext_t *cont
|
||||||
}
|
}
|
||||||
|
|
||||||
crash_handler_add_info_str(&pText, 335, 208, "Version", get_version_local());
|
crash_handler_add_info_str(&pText, 335, 208, "Version", get_version_local());
|
||||||
|
crash_handler_add_info_str(&pText, 8, 208, "RemoteBhv", gLastRemoteBhv);
|
||||||
|
|
||||||
// sounds
|
// sounds
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
|
|
|
@ -15,6 +15,7 @@ struct PcDebug {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct PcDebug gPcDebug;
|
extern struct PcDebug gPcDebug;
|
||||||
|
extern char gLastRemoteBhv[];
|
||||||
|
|
||||||
void crash_handler_init(void);
|
void crash_handler_init(void);
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,7 @@ static void coopnet_on_error(enum MPacketErrorNumber error, uint64_t tag) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ns_coopnet_initialize(enum NetworkType networkType, bool reconnecting) {
|
static bool ns_coopnet_initialize(enum NetworkType networkType, bool reconnecting) {
|
||||||
sNetworkType = networkType;
|
sNetworkType = networkType;
|
||||||
sReconnecting = reconnecting;
|
sReconnecting = reconnecting;
|
||||||
|
|
|
@ -6,9 +6,10 @@
|
||||||
#include "src/game/area.h"
|
#include "src/game/area.h"
|
||||||
#include "behavior_data.h"
|
#include "behavior_data.h"
|
||||||
#include "behavior_table.h"
|
#include "behavior_table.h"
|
||||||
#include "src/pc/lua/smlua.h"
|
#include "pc/lua/smlua.h"
|
||||||
#include "src/pc/lua/utils/smlua_model_utils.h"
|
#include "pc/lua/utils/smlua_model_utils.h"
|
||||||
#include "src/pc/lua/utils/smlua_obj_utils.h"
|
#include "pc/lua/utils/smlua_obj_utils.h"
|
||||||
|
#include "pc/crash_handler.h"
|
||||||
//#define DISABLE_MODULE_LOG 1
|
//#define DISABLE_MODULE_LOG 1
|
||||||
#include "pc/debuglog.h"
|
#include "pc/debuglog.h"
|
||||||
|
|
||||||
|
@ -154,6 +155,7 @@ void network_receive_spawn_objects(struct Packet* p) {
|
||||||
name = gNetworkPlayers[p->localIndex].name;
|
name = gNetworkPlayers[p->localIndex].name;
|
||||||
}
|
}
|
||||||
LOG_INFO("rx spawn object %s from %s (%s)", get_behavior_name_from_id(data.behaviorId), name, id);
|
LOG_INFO("rx spawn object %s from %s (%s)", get_behavior_name_from_id(data.behaviorId), name, id);
|
||||||
|
snprintf(gLastRemoteBhv, 256, "%s %s (%s)", get_behavior_name_from_id(data.behaviorId), name, id);
|
||||||
|
|
||||||
struct Object* parentObj = NULL;
|
struct Object* parentObj = NULL;
|
||||||
if (data.parentId == (u32)-1) {
|
if (data.parentId == (u32)-1) {
|
||||||
|
|
Loading…
Reference in a new issue