Skip to content

Commit 502f51d

Browse files
committed
Workaround for invalid vertex for object
1 parent 9b6a6db commit 502f51d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/xrGame/alife_switch_manager.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ void CALifeSwitchManager::add_online(CSE_ALifeDynamicObject* object, bool update
6060
clientID.set(server().GetServerClient() ? server().GetServerClient()->ID.value() : 0);
6161
server().Process_spawn(tNetPacket, clientID, FALSE, l_tpAbstract);
6262
object->s_flags.and (u16(-1) ^ M_SPAWN_UPDATE);
63-
R_ASSERT3(!object->used_ai_locations() || ai().level_graph().valid_vertex_id(object->m_tNodeID),
64-
"Invalid vertex for object ", object->name_replace());
63+
64+
// Xottab_DUTY: Workaround for crash with corpses that end up outside AI map
65+
//R_ASSERT3(!object->used_ai_locations() || ai().level_graph().valid_vertex_id(object->m_tNodeID),
66+
// "Invalid vertex for object ", object->name_replace());
67+
if (!object->used_ai_locations() || ai().level_graph().valid_vertex_id(object->m_tNodeID))
68+
Msg("Invalid vertex for object %s", object->name_replace());
6569

6670
#ifdef DEBUG
6771
if (psAI_Flags.test(aiALife))

0 commit comments

Comments
 (0)