useless cam functions
This commit is contained in:
@@ -117,6 +117,7 @@ void ClientGame::HandlePacket(const protocol::WorldDataPacket* packet) {
|
||||
m_WorldRenderer.LoadModels();
|
||||
// set cam pos to player spawn
|
||||
const game::Spawn& spawn = m_World->GetTeam(m_Player->GetTeamColor()).GetSpawn();
|
||||
m_WorldRenderer.ResetCam();
|
||||
m_WorldRenderer.SetCamPos(spawn.GetCenterX(), spawn.GetCenterY());
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,10 @@ void Renderer::SetCamMovement(const Vec2f& lastCursorPos, const Vec2f& currentCu
|
||||
SetCamLook(m_Camera.CamLook - movement);
|
||||
}
|
||||
|
||||
void Renderer::ResetCamLook() {
|
||||
m_Camera = Camera();
|
||||
}
|
||||
|
||||
void Renderer::SetCamPos(const Vec3f& newPos) {
|
||||
|
||||
Vec3f front = {
|
||||
|
||||
@@ -130,6 +130,10 @@ void WorldRenderer::RenderTooltips() const {
|
||||
RenderCastleTooltip();
|
||||
}
|
||||
|
||||
void WorldRenderer::ResetCam() {
|
||||
m_Renderer->ResetCamLook();
|
||||
}
|
||||
|
||||
void WorldRenderer::MoveCam(float relativeX, float relativeY) {
|
||||
if (m_WorldVao == nullptr)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user