diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2022-09-06 00:36:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-06 00:36:03 -0500 |
| commit | dedf6af27a21b45d522ebe84ce9fe1516954dd7b (patch) | |
| tree | 5916ae18d0fe5bb5a58f9f30da0ab7ea84248b03 /src/courtroom.cpp | |
| parent | dc58a661d39a8ffb3730511c9020e23d23865b1d (diff) | |
Fix case of self_offset received without a y offset (#864)
caused by typos in #701
it's possible for older clients to send x offsets without a y
offset. if you think this case is annoying you can remove it in
the next version and handle it server-side instead
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index e0ca5df7..b310ac6d 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3977,10 +3977,9 @@ void Courtroom::set_self_offset(const QString& p_list) { } else { self_offset_v = self_offsets[1].toInt(); - ui_vp_player_char->move_and_center(ui_viewport->width() * self_offset / 100, ui_viewport->height() * self_offset_v / 100); - const int percent = 100; - ui_vp_player_char->move(ui_viewport->width() * self_offset / percent, ui_viewport->height() * self_offset_v / percent); } + ui_vp_player_char->move_and_center(ui_viewport->width() * self_offset / 100, + ui_viewport->height() * self_offset_v / 100); } void Courtroom::set_ip_list(QString p_list) |
