Departed-pod resilience: collision guard + console loss ends the race

Round six raced all three machines (staging fix confirmed) and then
exposed what happens when a pod leaves mid-mission - which arcade pods
never did.

The B crash dump named it exactly: VTV::TakeDamageMessageHandler
resolved message->inflictingEntity to NULL (the entity belonged to the
departed owner) and dereferenced it - Verify is compiled out in
release. Collision damage from an entity that no longer exists is now
ignored.

And the race B and C were left in was a zombie: the owner (console)
had aborted, so the mission clock would count up forever and the
death/respawn flow hung with nobody to arbitrate. Lobby-member races
now set gConsoleLossEndsMission: losing the console mid-mission posts
StopMission locally, the pod tears down, and lands back in the lobby
room. Arcade -net pods keep the re-listen-and-wait behavior.

Loopback hosted race still green.

For the drivers: the ampersand key is the arcade mission-abort - that
was every crash-on-keypress so far; and a sleeping Bluetooth pad wakes
on the Xbox button and hot-connects within 3 seconds (PadRIO
re-probes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-13 00:02:54 -05:00
co-authored by Claude Fable 5
parent 2d5057c528
commit 3f691cacb3
5 changed files with 40 additions and 1 deletions
+16
View File
@@ -20,6 +20,8 @@
#include "l4host.h"
#include "l4net.h"
#include "l4nettransport.h"
#include "..\munga\appmgr.h"
#include "..\munga\appmsg.h"
#include "..\munga\mission.h"
#include "..\munga\notation.h"
//#include <netnub.hpp>
@@ -1000,6 +1002,20 @@ void L4NetworkManager::HostDisconnectedMessageHandler(HostDisconnectedMessage* H
#else
myConsoleHost = 0;
#endif
//
// Lobby-member races: the departed console was the race
// owner - without a console the mission clock counts up
// forever, so end the mission and get back to the lobby
// room. (Arcade pods keep the listen above and wait for
// their console to return.)
//
if (gConsoleLossEndsMission &&
application->GetApplicationState() == Application::RunningMission)
{
DEBUG_STREAM << "Console lost mid-race - ending the mission\n" << std::flush;
Application::StopMissionMessage stop_message(0);
application->Post(DefaultEventPriority, application, &stop_message);
}
break;
}
default: