# HG changeset patch # User Emmanuel Gil Peyrot # Date 1565615393 -7200 # Node ID 140ee7de6d9011dd0853705a3c41219f7c6fb724 # Parent 904849807fd888a94f6f9377845d6fe5ba50b2c9 Use the correct half-size of the hitbox. diff --git a/src/th06/enemy.rs b/src/th06/enemy.rs --- a/src/th06/enemy.rs +++ b/src/th06/enemy.rs @@ -245,7 +245,7 @@ impl Enemy { /// Sets the hitbox around the enemy. pub fn set_hitbox(&mut self, width: f32, height: f32) { - self.hitbox_half_size = [width, height]; + self.hitbox_half_size = [width / 2., height / 2.]; } /// Run all interpolators and such, and update internal variables once per