Skip to content

Commit

Permalink
Workaround for invalid vertex for object
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Dec 17, 2017
1 parent 9b6a6db commit 502f51d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xrGame/alife_switch_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ void CALifeSwitchManager::add_online(CSE_ALifeDynamicObject* object, bool update
clientID.set(server().GetServerClient() ? server().GetServerClient()->ID.value() : 0);
server().Process_spawn(tNetPacket, clientID, FALSE, l_tpAbstract);
object->s_flags.and (u16(-1) ^ M_SPAWN_UPDATE);
R_ASSERT3(!object->used_ai_locations() || ai().level_graph().valid_vertex_id(object->m_tNodeID),
"Invalid vertex for object ", object->name_replace());

// Xottab_DUTY: Workaround for crash with corpses that end up outside AI map
//R_ASSERT3(!object->used_ai_locations() || ai().level_graph().valid_vertex_id(object->m_tNodeID),
// "Invalid vertex for object ", object->name_replace());
if (!object->used_ai_locations() || ai().level_graph().valid_vertex_id(object->m_tNodeID))
Msg("Invalid vertex for object %s", object->name_replace());

#ifdef DEBUG
if (psAI_Flags.test(aiALife))
Expand Down

0 comments on commit 502f51d

Please sign in to comment.