fix last aim being held when unequipping MaterialItem while holding fire

This commit is contained in:
Kae 2023-07-31 16:41:12 +10:00
parent 830d4deb7b
commit 72e33fdef5
2 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,10 @@ void MaterialItem::init(ToolUserEntity* owner, ToolHand hand) {
BeamItem::init(owner, hand);
}
void MaterialItem::uninit() {
m_lastAimPosition.reset();
}
void MaterialItem::update(float dt, FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) {
FireableItem::update(dt, fireMode, shifting, moves);
BeamItem::update(dt, fireMode, shifting, moves);

View File

@ -18,6 +18,7 @@ public:
ItemPtr clone() const override;
void init(ToolUserEntity* owner, ToolHand hand) override;
void uninit() override;
void update(float dt, FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) override;
List<Drawable> nonRotatedDrawables() const override;