From 6ad92bf07a709456a96d525ebb16ef6c458d2431 Mon Sep 17 00:00:00 2001 From: Barry Kane Date: Thu, 23 Mar 2023 13:46:59 +0000 Subject: [PATCH] Make ships stop after teleporting through the wormhole. --- spacewarPlayer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacewarPlayer.h b/spacewarPlayer.h index 76828b1..1c591be 100644 --- a/spacewarPlayer.h +++ b/spacewarPlayer.h @@ -44,6 +44,8 @@ static inline void calculateGravity(xyVector * starPosition, ship * shipUnderGra { shipUnderGravity->position.xComponent = random() % 4000; shipUnderGravity->position.yComponent = random() % 4000; + shipUnderGravity->velocity.xComponent = 0; + shipUnderGravity->velocity.yComponent = 0; } } else