From 2b1240d63915e6562995986d66a142be43a7d62b Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 4 Sep 2022 20:32:29 +0300 Subject: [PATCH 52/52] Fix filling player "scenario reserved" property to editor packet See osdn #45491 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/editprop.c | 5 +++-- client/gui-gtk-4.0/editprop.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/gui-gtk-3.22/editprop.c b/client/gui-gtk-3.22/editprop.c index a6d19b41d3..8dfff7984c 100644 --- a/client/gui-gtk-3.22/editprop.c +++ b/client/gui-gtk-3.22/editprop.c @@ -91,7 +91,7 @@ static int get_next_unique_tag(void); #include "spechash.h" /* NB: If packet definitions change, be sure to - * update objbind_pack_current_values!!! */ + * update objbind_pack_current_values()!!! */ union packetdata { struct { gpointer v_pointer1; @@ -288,7 +288,7 @@ static struct propval *propstate_get_value(struct propstate *ps); 6. Add a case handler in objbind_pack_modified_value. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! 7. Add code to set the packet field in !!! - !!! objbind_pack_current_values. !!! + !!! objbind_pack_current_values(). !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8. Add code to handle changes in the packet field in server/edithand.c handle_edit_. @@ -2320,6 +2320,7 @@ static void objbind_pack_current_values(struct objbind *ob, packet->autoselect_weight = pplayer->autoselect_weight; packet->gold = pplayer->economic.gold; packet->government = government_index(pplayer->government); + packet->scenario_reserved = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); /* TODO: Set more packet fields. */ } return; diff --git a/client/gui-gtk-4.0/editprop.c b/client/gui-gtk-4.0/editprop.c index 66345eda11..d54a634e2e 100644 --- a/client/gui-gtk-4.0/editprop.c +++ b/client/gui-gtk-4.0/editprop.c @@ -91,7 +91,7 @@ static int get_next_unique_tag(void); #include "spechash.h" /* NB: If packet definitions change, be sure to - * update objbind_pack_current_values!!! */ + * update objbind_pack_current_values()!!! */ union packetdata { struct { gpointer v_pointer1; @@ -288,7 +288,7 @@ static struct propval *propstate_get_value(struct propstate *ps); 6. Add a case handler in objbind_pack_modified_value. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! 7. Add code to set the packet field in !!! - !!! objbind_pack_current_values. !!! + !!! objbind_pack_current_values(). !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8. Add code to handle changes in the packet field in server/edithand.c handle_edit_. @@ -2320,6 +2320,7 @@ static void objbind_pack_current_values(struct objbind *ob, packet->autoselect_weight = pplayer->autoselect_weight; packet->gold = pplayer->economic.gold; packet->government = government_index(pplayer->government); + packet->scenario_reserved = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); /* TODO: Set more packet fields. */ } return; -- 2.35.1