fix event registration
authoralfadur
Tue, 17 Nov 2020 01:04:15 +0300
changeset 15767 a818a87fec52
parent 15766 19ad3fe48ea6
child 15768 704f00889f3a
fix event registration
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,