tExtra braces added to if/else statements for clarity. - vaccinewars - be a doc… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 7bde4eec2df4a1c2e8606a751e1c2b4822ea2169 | |
parent 1feb8af1abfea229bc7cf9f19fc01e8f785985c7 | |
Author: Ben Webb <[email protected]> | |
Date: Sat, 13 Apr 2002 16:33:09 +0000 | |
Extra braces added to if/else statements for clarity. | |
Diffstat: | |
M src/gui_client/gtk_client.c | 31 +++++++++++++++++++----------… | |
1 file changed, 19 insertions(+), 12 deletions(-) | |
--- | |
diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c | |
t@@ -1068,10 +1068,12 @@ void DisplayFightMessage(char *Data) | |
return; | |
} | |
if (FightDialog) { | |
- if (IsShowingDealDrugs) | |
+ if (IsShowingDealDrugs) { | |
gtk_widget_destroy(DealDialog.dialog); | |
- if (!GTK_WIDGET_VISIBLE(FightDialog)) | |
+ } | |
+ if (!GTK_WIDGET_VISIBLE(FightDialog)) { | |
gtk_widget_show(FightDialog); | |
+ } | |
} else { | |
CreateFightDialog(); | |
} | |
t@@ -1114,10 +1116,11 @@ void DisplayFightMessage(char *Data) | |
SetJetButtonTitle(accel_group); | |
} else { | |
Message = Data; | |
- if (Play->Flags & FIGHTING) | |
+ if (Play->Flags & FIGHTING) { | |
fp = F_MSG; | |
- else | |
+ } else { | |
fp = F_LASTLEAVE; | |
+ } | |
CanFire = (Play->Flags & CANSHOOT); | |
CanRunHere = FALSE; | |
} | |
t@@ -1130,22 +1133,26 @@ void DisplayFightMessage(char *Data) | |
TextViewAppend(textview, "\n", NULL, TRUE); | |
} | |
- if (!CanRunHere || fp == F_LASTLEAVE) | |
+ if (!CanRunHere || fp == F_LASTLEAVE) { | |
gtk_widget_show(Deal); | |
- else | |
+ } else { | |
gtk_widget_hide(Deal); | |
- if (CanFire && TotalGunsCarried(Play) > 0) | |
+ } | |
+ if (CanFire && TotalGunsCarried(Play) > 0) { | |
gtk_widget_show(Fight); | |
- else | |
+ } else { | |
gtk_widget_hide(Fight); | |
- if (CanFire && TotalGunsCarried(Play) == 0) | |
+ } | |
+ if (CanFire && TotalGunsCarried(Play) == 0) { | |
gtk_widget_show(Stand); | |
- else | |
+ } else { | |
gtk_widget_hide(Stand); | |
- if (fp != F_LASTLEAVE) | |
+ } | |
+ if (fp != F_LASTLEAVE) { | |
gtk_widget_show(Run); | |
- else | |
+ } else { | |
gtk_widget_hide(Run); | |
+ } | |
} | |
/* |