X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcreature%2FSituation.hpp;h=fb26650d3137782c3bbdd83308d86a8f0138e624;hb=d921cba26f21e4a75b22f5e9d9be988707bf6a8f;hp=4205cff449c8e0f1d57cdaedd39c56662c62ddd2;hpb=475f28f06c9e14912bab8119264e247ef466513d;p=blobs.git diff --git a/src/creature/Situation.hpp b/src/creature/Situation.hpp index 4205cff..fb26650 100644 --- a/src/creature/Situation.hpp +++ b/src/creature/Situation.hpp @@ -53,10 +53,7 @@ public: bool OnPlanet() const noexcept; world::Planet &GetPlanet() const noexcept { return *planet; } bool OnSurface() const noexcept; - int Surface() const noexcept { return surface; } const glm::dvec3 &Position() const noexcept { return state.pos; } - bool OnTile() const noexcept; - glm::ivec2 SurfacePosition() const noexcept; world::Tile &GetTile() const noexcept; const world::TileType &GetTileType() const noexcept; @@ -64,18 +61,20 @@ public: const State &GetState() const noexcept { return state; } const glm::dvec3 &Velocity() const noexcept { return state.vel; } - bool Moving() const noexcept { return glm::length2(state.vel) > 0.0000001; } + bool Moving() const noexcept { return glm::length2(state.vel) > 0.00001; } void Move(const glm::dvec3 &dp) noexcept; + void Accelerate(const glm::dvec3 &dv) noexcept; + void EnforceConstraints(State &) noexcept; + void CheckWrap() noexcept; void Heading(const glm::dvec3 &h) noexcept { state.dir = h; } const glm::dvec3 &Heading() const noexcept { return state.dir; } - void SetPlanetSurface(world::Planet &, int srf, const glm::dvec3 &pos) noexcept; + void SetPlanetSurface(world::Planet &, const glm::dvec3 &pos) noexcept; public: world::Planet *planet; State state; - int surface; enum { LOST, PLANET_SURFACE,