1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-01-22 10:36:43 +00:00

control_enabled check on nikumaru

This commit is contained in:
dawnDus 2022-01-09 08:42:47 -05:00 committed by alula
parent 7d92b55b58
commit af6e36ef3b

View file

@ -20,7 +20,7 @@ impl NikumaruCounter {
}
impl GameEntity<&Player> for NikumaruCounter {
fn tick(&mut self, _state: &mut SharedGameState, player: &Player) -> GameResult {
fn tick(&mut self, state: &mut SharedGameState, player: &Player) -> GameResult {
if !player.equip.has_nikumaru() {
self.tick = 0;
self.shown = false;
@ -28,7 +28,10 @@ impl GameEntity<&Player> for NikumaruCounter {
}
self.shown = true;
self.tick += 1;
if state.control_flags.control_enabled() {
self.tick += 1;
}
if self.tick >= 300000 {
self.tick = 300000;