mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Swallow actions for simulated NPCs
This commit is contained in:
parent
dfb5e32803
commit
1e70ccfb8d
@ -6,7 +6,7 @@ use crate::{
|
|||||||
use common::{
|
use common::{
|
||||||
comp::{self, Body},
|
comp::{self, Body},
|
||||||
grid::Grid,
|
grid::Grid,
|
||||||
rtsim::{Actor, Personality},
|
rtsim::{Actor, NpcAction, Personality},
|
||||||
terrain::TerrainChunkSize,
|
terrain::TerrainChunkSize,
|
||||||
vol::RectVolSize,
|
vol::RectVolSize,
|
||||||
};
|
};
|
||||||
@ -264,6 +264,13 @@ impl Rule for SimulateNpcs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Consume NPC actions
|
||||||
|
for action in std::mem::take(&mut npc.controller.actions) {
|
||||||
|
match action {
|
||||||
|
NpcAction::Greet(_) => {}, // Currently, just swallow greeting actions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure NPCs remain on the surface
|
// Make sure NPCs remain on the surface
|
||||||
npc.wpos.z = ctx
|
npc.wpos.z = ctx
|
||||||
.world
|
.world
|
||||||
|
Loading…
Reference in New Issue
Block a user