push new empty events vec on resolve phase start
This commit is contained in:
parent
70711fd37b
commit
b62dc53e08
@ -86,7 +86,7 @@ function registerEvents(store) {
|
||||
store.dispatch(actions.setAnimating(true));
|
||||
store.dispatch(actions.setGameSkillInfo(null));
|
||||
// stop fetching the game state til animations are done
|
||||
const newRes = game.events[currentGame.events.length - 1];
|
||||
const newRes = game.events[currentGame.events.length];
|
||||
return eachSeries(newRes, (r, cb) => {
|
||||
const timeout = r.delay;
|
||||
const anims = animations.getObjects(r, game, account);
|
||||
|
||||
@ -191,9 +191,7 @@ impl Game {
|
||||
}
|
||||
|
||||
fn skill_phase_start(mut self, resolution_animation_ms: i64) -> Game {
|
||||
self.events.push(vec![]);
|
||||
|
||||
self.phase_start = Utc::now()
|
||||
self.phase_start = Utc::now()
|
||||
.checked_add_signed(Duration::milliseconds(resolution_animation_ms))
|
||||
.expect("could not set phase start");
|
||||
|
||||
@ -415,6 +413,8 @@ impl Game {
|
||||
}
|
||||
|
||||
pub fn resolve_phase_start(mut self) -> Game {
|
||||
self.events.push(vec![]);
|
||||
|
||||
if self.phase != Phase::Skill {
|
||||
panic!("game not in skill phase");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user