From f98e6d4ea4ee52b298a7d9a9731da4c020bb4dfe Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Fri, 18 Aug 2023 00:18:53 -0600 Subject: Some aim thingy --- src/entity.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/entity.c') diff --git a/src/entity.c b/src/entity.c index bb874df..52d24f6 100644 --- a/src/entity.c +++ b/src/entity.c @@ -1,5 +1,6 @@ #include "entity.h" #include "entitiesInclude.h" +#include // This fucker is used for creating entities. const EntityTypeInfo entityTypeInfo[ENTITY_TYPE_COUNT] = { @@ -375,15 +376,10 @@ void entityDraw(Entity * entity) { } void entityUpdatePosition(Entity * entity) { - float t = GetFrameTime(); - - Vector3 velocity = (Vector3){ - entity->velocity.velocity.x * t, - entity->velocity.velocity.y * t, - entity->velocity.velocity.z * t - }; - - entity->position = Vector3Add(entity->position, velocity); + entity->position = Vector3Add( + entity->position, + Vector3Scale(entity->velocity.velocity, GetFrameTime()) + ); } void entityUpdateRotation(Entity * entity) { -- cgit v1.2.3