From e4a1425dccd0ba9b106e415dd02809f4308a85ee Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Fri, 20 Nov 2015 09:23:56 +0100 Subject: [PATCH] some annotations --- doc/todo | 5 +++++ src/world/Entity.hpp | 3 +++ src/world/world.cpp | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/todo b/doc/todo index 1b7d9b0..f716091 100644 --- a/doc/todo +++ b/doc/todo @@ -44,6 +44,8 @@ networking maybe stale and inexistent chunks should be visualized (e.g. by drawing a semi-transparent box around them) + make a chunk data counting a little safer + threading (clientside) networking and disk IO are prime candidates for threading @@ -79,6 +81,8 @@ gravity now implemented as optional gravity emitter per block type let's see how that pans out + maybe players should be given the option to switch between + walk and fly mode block attributes @@ -105,6 +109,7 @@ entity/world collision I don't like the force/spring based collision response, maybe revert back to impulses + also, it fails in some cases spawning diff --git a/src/world/Entity.hpp b/src/world/Entity.hpp index b3eb1f4..1a6fccf 100644 --- a/src/world/Entity.hpp +++ b/src/world/Entity.hpp @@ -152,6 +152,9 @@ private: // TODO: I'd prefer a drag solution float max_vel; + // TODO: split max_force into (local) axes? + // e.g. players may want to disable vertical thrust under certain + // conditions (e.g. "walking" ^^) float max_force; int ref_count; diff --git a/src/world/world.cpp b/src/world/world.cpp index 2a3d5fb..d2b05d6 100644 --- a/src/world/world.cpp +++ b/src/world/world.cpp @@ -605,8 +605,8 @@ void World::Update(Entity &entity, float dt) { EntityDerivative f; constexpr float sixth = 1.0f / 6.0f; - f.position = sixth * ((a.position + 2.0f * (b.position + c.position)) + d.position); - f.velocity = sixth * ((a.velocity + 2.0f * (b.velocity + c.velocity)) + d.velocity); + f.position = sixth * (a.position + 2.0f * (b.position + c.position) + d.position); + f.velocity = sixth * (a.velocity + 2.0f * (b.velocity + c.velocity) + d.velocity); state.pos.block += f.position * dt; state.velocity += f.velocity * dt; -- 2.39.2