X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fstates.cpp;h=cbb2309581f05d35f0babf00374b0b97729ccaf0;hb=0e061ce526fe46dd3e894223e5d646eb2e30f826;hp=4951c9f220c5afe1308b13e504ed33d981d068e6;hpb=392826deaf802ac0960ed3924a3f98b9d18d381b;p=blobs.git diff --git a/src/app/states.cpp b/src/app/states.cpp index 4951c9f..cbb2309 100644 --- a/src/app/states.cpp +++ b/src/app/states.cpp @@ -109,7 +109,7 @@ void MasterState::OnMouseMotion(const SDL_MouseMotionEvent &e) { constexpr double pitch_scale = PI * 0.001; constexpr double yaw_scale = PI * 0.002; if (cam_dragging) { - cam_orient.x = glm::clamp(cam_orient.x + double(e.yrel) * pitch_scale, 0.0, PI * 0.5); + cam_orient.x = glm::clamp(cam_orient.x + double(e.yrel) * pitch_scale, 0.0, PI * 0.499); cam_orient.y = std::fmod(cam_orient.y + double(e.xrel) * yaw_scale, PI * 2.0); } } @@ -188,8 +188,8 @@ void MasterState::OnRender(graphics::Viewport &viewport) { // TODO: extend to nearby bodies as well for (auto c : cam.Reference().Creatures()) { assets.shaders.creature_skin.SetM(cam.Model(cam.Reference()) * glm::mat4(c->LocalTransform())); - assets.shaders.creature_skin.SetBaseColor(c->BaseColor()); - assets.shaders.creature_skin.SetHighlightColor(c->HighlightColor()); + assets.shaders.creature_skin.SetBaseColor(glm::vec3(c->BaseColor())); + assets.shaders.creature_skin.SetHighlightColor(glm::vec4(c->HighlightColor())); c->Draw(viewport); }