From 39eb68210c3d3469fb382598a3fbb8d61bce1810 Mon Sep 17 00:00:00 2001 From: Martin Palko Date: Sun, 7 Jun 2020 11:19:15 -0400 Subject: [PATCH] Fixed compile errors on 'Boxing' mechanic - Fixed use of missing 'BodyFacing' variable in the drawing code - Fixed use of missing 'Establish_Contact' method, used 'Transmit_Message(RADIO_HELLO...' instead d2f1d8 --- TIBERIANDAWN/INFANTRY.CPP | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TIBERIANDAWN/INFANTRY.CPP b/TIBERIANDAWN/INFANTRY.CPP index 1db1082..962dc9c 100644 --- a/TIBERIANDAWN/INFANTRY.CPP +++ b/TIBERIANDAWN/INFANTRY.CPP @@ -635,7 +635,7 @@ void InfantryClass::Draw_It(int x, int y, WindowNumberType window) #ifdef BOXING // BG hack to get him to face right when he's supposed to. - if (IsBoxing && BodyFacing<128) shapenum += 47; + if (IsBoxing && facing < Facing_To_32(DIR_S)) shapenum += 47; #endif /* @@ -1143,7 +1143,7 @@ void InfantryClass::AI(void) if (Is_Target_Infantry(TarCom) && (Distance(TarCom)<=0x80) && (Coord_Y(Coord) == Coord_Y(object->Coord))) { // Too close to shoot, so start hand-to-hand combat - if (Establish_Contact((TechnoClass *)object)) { + if (Transmit_Message(RADIO_HELLO, (TechnoClass *)object) == RADIO_ROGER) { if (Transmit_Message(RADIO_PREPARE_TO_BOX) == RADIO_ROGER) { IsBoxing = true; Do_Action(DO_ON_GUARD,true);