diff options
| author | tom barrett <spalf0@gmail.com> | 2018-04-05 02:20:27 -0500 | 
|---|---|---|
| committer | tom barrett <spalf0@gmail.com> | 2018-04-05 02:20:27 -0500 | 
| commit | 9bbd8b1c7039c046ca3992e4a9e1ceefda80f816 (patch) | |
| tree | 59526b3207ddc99e93991ae97128ae83a4387f9b /src | |
| parent | 22ec8b31c66475f29106f2fda46969e427f2e704 (diff) | |
-now targeting works after a delay
Diffstat (limited to 'src')
| -rw-r--r-- | src/ship.rs | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ship.rs b/src/ship.rs index f56492e..090cd7d 100644 --- a/src/ship.rs +++ b/src/ship.rs @@ -89,8 +89,8 @@ impl Ship {      pub fn give_target(&mut self, target : Option<usize>) {          self.targeting.target = target; -        self.targeting.status = TargetingStatus::Targeted; -        //self.targeting.start = Some(SystemTime::now()); +        self.targeting.status = TargetingStatus::Targeting; +        self.targeting.start = Some(SystemTime::now());      }      pub fn recv_target(&self) -> Option<usize> { @@ -114,7 +114,6 @@ impl Mass for Ship {          self.position.0 += self.velocity.0;          self.position.1 += self.velocity.1;          self.position.2 += self.velocity.2; -        /*          match self.targeting.start {              Some(time) => {                  if time.elapsed().unwrap().as_secs() > self.targeting.time { @@ -123,7 +122,6 @@ impl Mass for Ship {              }              None => (),          } -        */      }      fn position(&self) -> (f64, f64, f64) {  | 
