mirror of
https://gitlab.com/veloren/veloren
synced 2026-08-16 16:26:07 -04:00
Make mounted NPC properly utilize their free will
This commit is contained in:
parent
55322470e5
commit
d806b72062
2 changed files with 7 additions and 2 deletions
|
|
@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Fix Orientation of Wildskin Drum's Thumbnail
|
||||
- Fast river sfx
|
||||
- All NPCs don't go to bed & wake up at the same time.
|
||||
- Mounted NPC can now properly utilize their free will.
|
||||
|
||||
## [0.18.0] - 2026-01-23
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ impl<'a> System<'a> for Sys {
|
|||
read_data.groups.maybe(),
|
||||
read_data.rtsim_actors.maybe(),
|
||||
(
|
||||
!&read_data.is_mounts,
|
||||
read_data.is_mounts.maybe(),
|
||||
read_data.is_riders.maybe(),
|
||||
read_data.is_volume_riders.maybe(),
|
||||
),
|
||||
|
|
@ -94,11 +94,15 @@ impl<'a> System<'a> for Sys {
|
|||
light_emitter,
|
||||
group,
|
||||
rtsim_actor,
|
||||
(_, is_rider, is_volume_rider),
|
||||
(is_mount, is_rider, is_volume_rider),
|
||||
)| {
|
||||
let mut emitters = events.get_emitters();
|
||||
let mut rng = rng();
|
||||
|
||||
if is_mount.is_some() && body.is_none_or(|body| !body.has_free_will()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The entity that is moving, if riding it's the mount, otherwise it's itself
|
||||
let moving_entity = is_rider
|
||||
.and_then(|is_rider| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue