aboutsummaryrefslogtreecommitdiff
path: root/src/entities
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-10-06 23:18:20 -0600
committernathansmithsmith <nathansmith7@mailfence.com>2023-10-06 23:18:20 -0600
commit71f748a76ef0b86b6377ea82cb2e7e785d28b647 (patch)
treeb66c022e3a9d74600f165f04f08a2f4d2f66f339 /src/entities
parenta3e1d468a46f2f463500ccbec042e96350f74475 (diff)
Fixed issues I should have fixed a while ago
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/antifaShip.c1
-rw-r--r--src/entities/soldato.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/entities/antifaShip.c b/src/entities/antifaShip.c
index 36d438c..e7f6d91 100644
--- a/src/entities/antifaShip.c
+++ b/src/entities/antifaShip.c
@@ -97,6 +97,7 @@ void controlAntifaShipKeyboardAndMouse(Game * game, Entity * entity) {
data->forwardSpeed = ANTIFA_SHIP_MAX_SPEED;
Vector2 v = Vector2Subtract(mouse, data->lastMouse);
+ v = Vector2Scale(v, 1.0 / GetFrameTime());
data->lastMouse = mouse;
// Using mouse as a joystick.
diff --git a/src/entities/soldato.c b/src/entities/soldato.c
index 2122a5a..4230177 100644
--- a/src/entities/soldato.c
+++ b/src/entities/soldato.c
@@ -200,6 +200,10 @@ void setSoldatoLeader(Entity * entity1, Entity * entity2) {
// Already has leader.
if (follower->follow.leaderId != ENTITY_NONE)
return;
+ // Stops funny thingy.
+ if (follower->follow.followerFingerprint == leader->fingerprint
+ || leader->follow.leaderFingerprint == follower->fingerprint)
+ return;
follower->follow.leaderId = leader->id;
follower->follow.leaderFingerprint = leader->fingerprint;