mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Cleaning
This commit is contained in:
parent
00a34da48b
commit
06e0303e8a
@ -268,9 +268,12 @@ impl<'a> System<'a> for Sys {
|
|||||||
|
|
||||||
let event_emitter = event_bus.emitter();
|
let event_emitter = event_bus.emitter();
|
||||||
|
|
||||||
// Default to looking in orientation direction
|
|
||||||
// (can be overridden below)
|
|
||||||
if !matches!(char_state, CharacterState::LeapMelee(_)) {
|
if !matches!(char_state, CharacterState::LeapMelee(_)) {
|
||||||
|
// Default to looking in orientation direction
|
||||||
|
// (can be overridden below)
|
||||||
|
//
|
||||||
|
// This definetly breaks LeapMelee and
|
||||||
|
// probably not only that, do we really need this?
|
||||||
controller.reset();
|
controller.reset();
|
||||||
controller.inputs.look_dir = ori.look_dir();
|
controller.inputs.look_dir = ori.look_dir();
|
||||||
}
|
}
|
||||||
@ -323,8 +326,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
&& rtsim_entity.is_some()
|
&& rtsim_entity.is_some()
|
||||||
&& matches!(body, Some(Body::Ship(_)))
|
&& matches!(body, Some(Body::Ship(_)))
|
||||||
{
|
{
|
||||||
// hack (kinda): Never turn off flight for rtsim entities
|
// hack (kinda): Never turn off flight for rtsim airships
|
||||||
// that can fly at all,
|
|
||||||
// since it results in stuttering and falling back to the ground.
|
// since it results in stuttering and falling back to the ground.
|
||||||
controller
|
controller
|
||||||
.actions
|
.actions
|
||||||
@ -429,8 +431,17 @@ impl<'a> System<'a> for Sys {
|
|||||||
);
|
);
|
||||||
// Target is something worth following
|
// Target is something worth following
|
||||||
// methinks
|
// methinks
|
||||||
} else if let Some(Alignment::Owned(_)) = data.alignment {
|
} else if let Some(Alignment::Owned(uid)) = data.alignment {
|
||||||
react_as_pet(agent, target, controller, event_emitter);
|
if read_data.uids.get(target) == Some(uid) {
|
||||||
|
react_as_pet(
|
||||||
|
agent,
|
||||||
|
target,
|
||||||
|
controller,
|
||||||
|
event_emitter,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
relax(agent, controller, event_emitter);
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
idle(agent, controller, event_emitter);
|
idle(agent, controller, event_emitter);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user