mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
don't load npc by themself if they're riding
This commit is contained in:
parent
3548b464da
commit
60b626d3ee
@ -332,6 +332,8 @@ impl<'a> System<'a> for Sys {
|
|||||||
// loaded
|
// loaded
|
||||||
if matches!(npc.mode, SimulationMode::Simulated)
|
if matches!(npc.mode, SimulationMode::Simulated)
|
||||||
&& chunk_states.0.get(chunk).map_or(false, |c| c.is_some())
|
&& 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;
|
npc.mode = SimulationMode::Loaded;
|
||||||
let entity_info = get_npc_entity_info(npc, &data.sites, index.as_index_ref());
|
let entity_info = get_npc_entity_info(npc, &data.sites, index.as_index_ref());
|
||||||
|
Loading…
Reference in New Issue
Block a user