Skip to content

Commit

Permalink
Merge pull request #43 from Jupeyy/pr_hud_scale_fix
Browse files Browse the repository at this point in the history
Use window props in hud scaling
  • Loading branch information
Jupeyy authored Jan 7, 2025
2 parents f6d0192 + 6d81192 commit 5db7191
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions game/client-render-game/src/components/hud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ use graphics::{
};
use graphics_types::rendering::State;
use math::math::{vector::vec2, Rng, RngSlice, PI};
use vanilla::weapons::definitions::weapon_def::{
get_weapon_sprite_scale, get_weapon_visual_scale,
};
use ui_base::ui::UiCreator;
use vanilla::weapons::definitions::weapon_def::{get_weapon_sprite_scale, get_weapon_visual_scale};

const GRID_SIZE: f32 = 36.0;

Expand Down Expand Up @@ -812,8 +810,8 @@ impl RenderHud {
state.map_canvas(
0.0,
0.0,
self.canvas_handle.canvas_width() / ppp,
self.canvas_handle.canvas_height() / ppp,
self.canvas_handle.window_width() as f32 / ppp,
self.canvas_handle.window_height() as f32 / ppp,
);

match pipe.local_player_render_info {
Expand Down

0 comments on commit 5db7191

Please sign in to comment.