From: Daniel Karbach Date: Fri, 20 Nov 2015 08:23:56 +0000 (+0100) Subject: some annotations X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=e4a1425dccd0ba9b106e415dd02809f4308a85ee;p=blank.git some annotations --- 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;