don't load npc by themself if they're riding

This commit is contained in:
Isse 2023-04-14 13:21:43 +02:00
parent 3548b464da
commit 60b626d3ee

View File

@ -332,6 +332,8 @@ impl<'a> System<'a> for Sys {
// loaded
if matches!(npc.mode, SimulationMode::Simulated)
&& chunk_states.0.get(chunk).map_or(false, |c| c.is_some())
// Riding npcs will be spawned by the vehicle.
&& npc.riding.is_none()
{
npc.mode = SimulationMode::Loaded;
let entity_info = get_npc_entity_info(npc, &data.sites, index.as_index_ref());