Skip to content

Commit

Permalink
fix: x hitbox slightly shrunk
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkittyy committed Nov 21, 2022
1 parent 078cef8 commit a010ae4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion game/gui/level_card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void ApiLevelTile::m_gui_leaderboard_popup(fsm* sm) {
ImGui::TextWrapped("%s", res.error->c_str());
ImGui::PopStyleColor();
} else {
if (ImGui::BeginTable("###Scores", 4, ImGuiTableFlags_Borders)) {
if (ImGui::BeginTable("###Scores", 5, ImGuiTableFlags_Borders)) {
ImGui::TableNextRow();
ImGui::PushStyleColor(ImGuiCol_Text, ImGui::GetColorU32(sf::Color(0xC8AD7FFF)));
ImGui::TableNextColumn();
Expand All @@ -95,6 +95,8 @@ void ApiLevelTile::m_gui_leaderboard_popup(fsm* sm) {
ImGui::TableNextColumn();
ImGui::Text("Submitted");
ImGui::TableNextColumn();
ImGui::Text("Version");
ImGui::TableNextColumn();
ImGui::Text("Replay");
ImGui::PopStyleColor();
for (int i = 0; i < res.scores.size(); ++i) {
Expand All @@ -111,6 +113,8 @@ void ApiLevelTile::m_gui_leaderboard_popup(fsm* sm) {
std::strftime(date_fmt, 100, "%D %r", date_tm);
ImGui::Text("%s", date_fmt);
ImGui::TableNextColumn();
ImGui::Text("%s", score.version.c_str());
ImGui::TableNextColumn();
if (ImGui::ImageButtonWithText(resource::get().imtex("assets/gui/download.png"), "Replay")) {
sm->swap_state<states::edit>(m_lvl, replay(score));
}
Expand Down
4 changes: 2 additions & 2 deletions game/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,9 @@ sf::FloatRect world::m_get_player_right_aabb(float x, float y) const {
sf::FloatRect world::m_get_player_x_aabb(float x, float y) const {
sf::FloatRect aabb = m_get_player_aabb(x, y);
sf::FloatRect ret;
ret.left = aabb.left;
ret.left = aabb.left + 0.001f;
ret.top = aabb.top + 0.1f;
ret.width = aabb.width;
ret.width = aabb.width - 0.001f;
ret.height = aabb.height - 0.2f;

return ret;
Expand Down

0 comments on commit a010ae4

Please sign in to comment.