Skip to content

Commit

Permalink
tidy up debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fallahn committed Sep 18, 2023
1 parent f03d242 commit 66c5ce6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
5 changes: 4 additions & 1 deletion crogine/src/ecs/systems/RenderSystem2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ void RenderSystem2D::render(Entity cameraEntity, const RenderTarget& rt)
auto scissorStart = mapCoordsToPixel(start, pass.viewProjectionMatrix, viewport);
auto scissorEnd = mapCoordsToPixel(end, pass.viewProjectionMatrix, viewport);

glCheck(glScissor(scissorStart.x, scissorStart.y, scissorEnd.x - scissorStart.x, scissorEnd.y - scissorStart.y));
auto w = scissorEnd.x - scissorStart.x;
auto h = scissorEnd.y - scissorStart.y;

glCheck(glScissor(scissorStart.x, scissorStart.y, w, h));
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions samples/golf/buildnumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef BUILD_NUMBER_H_
#define BUILD_NUMBER_H_

#define BUILDNUMBER 1831
#define BUILDNUMBER_STR "1831"
#define BUILDNUMBER 1832
#define BUILDNUMBER_STR "1832"

#endif /* BUILD_NUMBER_H_ */
4 changes: 3 additions & 1 deletion samples/golf/src/golf/ClientCollisionSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ void ClientCollisionSystem::process(float)
{
notify(CollisionEvent::Begin, position);

//really we only want to do this if the lie is 'buried' however
//it's not been updated from the servr yet...
if (collider.terrain == TerrainID::Bunker)
{
entity.getComponent<cro::Transform>().setOrigin({ 0.f, Ball::Radius * 1.5f, 0.f });
entity.getComponent<cro::Transform>().setOrigin({ 0.f, Ball::Radius * 1.2f, 0.f });
}
}
else if(collider.terrain == TerrainID::Hole
Expand Down
9 changes: 0 additions & 9 deletions samples/golf/src/golf/GolfStateUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,18 +1133,9 @@ void GolfState::buildUI()
auto miniBounds = mapEnt.getComponent<cro::Transform>().getWorldTransform() * mapEnt.getComponent<cro::Drawable2D>().getLocalBounds();
auto targBounds = glm::inverse(e.getComponent<cro::Transform>().getWorldTransform()) * miniBounds;
e.getComponent<cro::Drawable2D>().setCroppingArea(targBounds);
cropRect = targBounds;
};
mapEnt.getComponent<cro::Transform>().addChild(entity.getComponent<cro::Transform>());

/*registerWindow([]()
{
if (ImGui::Begin("buns"))
{
ImGui::Text("Left: %3.3f, Bottom: %3.3f, Width: %3.3f, Height: %3.3f", cropRect.left, cropRect.bottom, cropRect.width, cropRect.height);
}
ImGui::End();
});*/


//green close up view
Expand Down
6 changes: 3 additions & 3 deletions samples/golf/src/golf/server/ServerLobbyState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ void LobbyState::netEvent(const net::NetEvent& evt)
if (idx < ConstVal::MaxClients)
{
m_sharedData.clubLevels[idx] = (data & 0xff);
LogI << "set club level for client " << (int)idx << std::endl;
//LogI << "set club level for client " << (int)idx << std::endl;
}
else
/*else
{
LogW << "Got Club Level packet from client ID " << (int)idx << std::endl;
}
}*/
}
break;
case PacketID::RequestGameStart:
Expand Down

0 comments on commit 66c5ce6

Please sign in to comment.