mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +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 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 {
|
let Some(entity_to_update) = self.map.get(entity_to_update_key) else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
animations.push(AnimationInstruction::Move(
|
||||||
|
entity_to_update_key,
|
||||||
|
desired_location,
|
||||||
|
entity_to_update.move_effect(),
|
||||||
|
));
|
||||||
|
|
||||||
let overlap_resolutions: Vec<_> = self
|
let overlap_resolutions: Vec<_> = self
|
||||||
.whats_at(desired_location)
|
.whats_at(desired_location)
|
||||||
.filter(|(k, _)| *k != entity_to_update_key)
|
.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> {
|
fn kill_sound_effect(&self) -> Option<SoundEffect> {
|
||||||
match self.holding() {
|
match self.holding() {
|
||||||
Some(EntityType::Item(Item::Sword)) => Some(SoundEffect::SwordKill),
|
Some(EntityType::Item(Item::Sword)) => Some(SoundEffect::SwordKill),
|
||||||
|
|
Loading…
Reference in a new issue