# HG changeset patch # User alfadur # Date 1605564255 -10800 # Node ID a818a87fec526bd10c0464fd316e816a7b59393d # Parent 19ad3fe48ea69900543463981fd7d3c1163368d1 fix event registration diff -r 19ad3fe48ea6 -r a818a87fec52 rust/hwphysics/src/time.rs --- a/rust/hwphysics/src/time.rs Mon Nov 16 01:41:42 2020 +0300 +++ b/rust/hwphysics/src/time.rs Tue Nov 17 01:04:15 2020 +0300 @@ -68,7 +68,7 @@ pub fn register(&mut self, gear_id: GearId, timeout: Millis) -> EventId { let event_id = self.current_event_id; - self.current_event_id.wrapping_add(1); + self.current_event_id = self.current_event_id.wrapping_add(1); let event = TimeEvent { time: self.current_time + timeout, gear_id,