From 3b36a23404a587bbeeb6248f9bca136e6a3d83f6 Mon Sep 17 00:00:00 2001 From: Japa Date: Mon, 7 Sep 2015 22:41:24 +0530 Subject: [PATCH] Add soldier state to remotefortressreader.cpp --- plugins/proto/RemoteFortressReader.proto | 8 ++++---- plugins/remotefortressreader.cpp | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/proto/RemoteFortressReader.proto b/plugins/proto/RemoteFortressReader.proto index d62573d90..c0d7104a7 100644 --- a/plugins/proto/RemoteFortressReader.proto +++ b/plugins/proto/RemoteFortressReader.proto @@ -179,10 +179,10 @@ message UnitDefinition optional int32 pos_z = 5; optional MatPair race = 6; optional ColorDefinition profession_color = 7; - optional uint32 flags1 = 8; - optional uint32 flags2 = 9; - optional uint32 flags3 = 10; - + optional uint32 flags1 = 8; + optional uint32 flags2 = 9; + optional uint32 flags3 = 10; + optional bool is_soldier = 11; } message UnitList diff --git a/plugins/remotefortressreader.cpp b/plugins/remotefortressreader.cpp index fc7ac9a5d..857c70b07 100644 --- a/plugins/remotefortressreader.cpp +++ b/plugins/remotefortressreader.cpp @@ -965,6 +965,7 @@ static command_result GetUnitList(color_ostream &stream, const EmptyMessage *in, send_unit->set_flags1(unit->flags1.whole); send_unit->set_flags2(unit->flags2.whole); send_unit->set_flags3(unit->flags3.whole); + send_unit->set_is_soldier(ENUM_ATTR(profession, military, unit->profession)); } return CR_OK; }