Skip to content

Commit e9891a1

Browse files
committed
swars: Updated panel state enum uses
Also in one place, reversed the condition as it was invalid.
1 parent 8617b1d commit e9891a1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/game.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,8 @@ void game_graphics_inputs(void)
22042204
if ((ingame.DisplayMode != DpM_ENGINEPLY) &&
22052205
(ingame.DisplayMode != DpM_UNKN_3B))
22062206
return;
2207-
if (in_network_game && p_locplayer->PanelState[mouser] != 17)
2207+
if (in_network_game && p_locplayer->PanelState[mouser]
2208+
== PANEL_STATE_SEND_MESSAGE)
22082209
return;
22092210

22102211
if (is_gamekey_pressed(GKey_CAMERA_PERSPECTV))
@@ -2726,7 +2727,7 @@ void init_level(void)
27262727
p_player->UserVZ[mouser] = 0;
27272728
p_player->SpecialItems[mouser] = 0;
27282729
p_player->PanelItem[mouser] = 0;
2729-
p_player->PanelState[mouser] = 0;
2730+
p_player->PanelState[mouser] = PANEL_STATE_NORMAL;
27302731
}
27312732
p_player->GotoFace = 0;
27322733
p_player->field_102 = 0;
@@ -4763,7 +4764,7 @@ void do_scroll_map(void)
47634764
engn_zc_orig = engn_zc;
47644765
if (ctlmode == UInpCtr_Mouse || pktrec_mode == PktR_PLAYBACK)
47654766
{
4766-
if (!p_locplayer->PanelState[mouser])
4767+
if (p_locplayer->PanelState[mouser] == PANEL_STATE_NORMAL)
47674768
{
47684769
long cumm_alt;
47694770
int mv_border;
@@ -5038,9 +5039,10 @@ ubyte do_user_interface(void)
50385039
if (is_key_pressed(KC_RETURN, KMod_DONTCARE))
50395040
{
50405041
clear_key_pressed(KC_RETURN);
5041-
if ((p_locplayer->PanelState[mouser] != 17) && (player_unkn0C9[local_player_no] <= 140))
5042+
if ((p_locplayer->PanelState[mouser] != PANEL_STATE_SEND_MESSAGE)
5043+
&& (player_unkn0C9[local_player_no] <= 140))
50425044
{
5043-
p_locplayer->PanelState[mouser] = 17;
5045+
p_locplayer->PanelState[mouser] = PANEL_STATE_SEND_MESSAGE;
50445046
reset_buffered_keys();
50455047
player_unknCC9[local_player_no][0] = '\0';
50465048
player_unkn0C9[local_player_no] = 0;
@@ -5049,7 +5051,7 @@ ubyte do_user_interface(void)
50495051
}
50505052
}
50515053
}
5052-
if (p_locplayer->PanelState[mouser] == 17)
5054+
if (p_locplayer->PanelState[mouser] == PANEL_STATE_SEND_MESSAGE)
50535055
return process_mouse_imputs() != 0;
50545056

50555057
// screenshot
@@ -6921,7 +6923,7 @@ void load_packet(void)
69216923
}
69226924
}
69236925

6924-
if (p_locplayer->PanelState[mouser] != 17)
6926+
if (p_locplayer->PanelState[mouser] != PANEL_STATE_SEND_MESSAGE)
69256927
{
69266928
if (in_network_game || (ingame.UserFlags & UsrF_Cheats) != 0)
69276929
{

0 commit comments

Comments
 (0)