mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
fix mistakes copy over
This commit is contained in:
parent
b9e6e09fe1
commit
e33eee7d11
|
@ -185,10 +185,19 @@ impl EntityMap {
|
|||
};
|
||||
|
||||
if can_move {
|
||||
if let Some(e) = self.map.get_mut(entity_to_update_key) {
|
||||
e.location = desired_location;
|
||||
}
|
||||
let Some(entity_to_update) = self.map.get(entity_to_update_key) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
animations.push(AnimationInstruction::Move(
|
||||
entity_to_update_key,
|
||||
desired_location,
|
||||
entity_to_update.move_effect(),
|
||||
));
|
||||
|
||||
let overlap_resolutions: Vec<_> = self
|
||||
.whats_at(desired_location)
|
||||
.filter(|(k, _)| *k != entity_to_update_key)
|
||||
|
@ -569,6 +578,10 @@ impl Entity {
|
|||
}
|
||||
}
|
||||
|
||||
fn move_effect(&self) -> Option<SoundEffect> {
|
||||
None
|
||||
}
|
||||
|
||||
fn kill_sound_effect(&self) -> Option<SoundEffect> {
|
||||
match self.holding() {
|
||||
Some(EntityType::Item(Item::Sword)) => Some(SoundEffect::SwordKill),
|
||||
|
|
Loading…
Reference in a new issue