From b4f6c3e3ed717b669ddd19ad79efb52175076995 Mon Sep 17 00:00:00 2001 From: Wanne Date: Fri, 14 Oct 2011 16:52:56 +0000 Subject: [PATCH] - Bugfix: When we get 2nd robot from Madlab, 2nd robot did not have a weapon o How you can get the 2nd robot --> Do NOT dismiss the dead robot from the merc list, otherwise you will not get a 2nd robot --> Give Madlab another video camera and another rifle --> Wait one day and Madlab gives you another remote control --> Go back to the sector where first robot was destroyed and now the robot is back. It will be placed on map edge, fully functional :) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4711 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Dialogue.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Tactical/Interface Dialogue.cpp b/Tactical/Interface Dialogue.cpp index dcccff559..6998f7e34 100644 --- a/Tactical/Interface Dialogue.cpp +++ b/Tactical/Interface Dialogue.cpp @@ -3074,6 +3074,14 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum SetFactFalse( FACT_MADLAB_HAS_GOOD_CAMERA ); pSoldier = FindSoldierByProfileID( MADLAB, FALSE ); pSoldier2 = FindSoldierByProfileID( ROBOT, FALSE ); + + // WANNE: If we get the 2nd (repaired) robot, first recruit, then give the robot the weapon from madlab + if (gubFact[FACT_ROBOT_READY_SECOND_TIME] == TRUE) + { + RecruitEPC( ROBOT ); + } + + // Give the robot the weapon, we gave madlab earlier if ( pSoldier && pSoldier2 ) { // Give weapon to robot @@ -3085,8 +3093,11 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum AutoPlaceObject( pSoldier2, &( pSoldier->inv[ bSlot ] ) , FALSE ); } } - // Allow robot to be controlled by remote! - RecruitEPC( ROBOT ); + + // WANNE: This is out first robot. Recruit it AFTER we gave him the weapon! + if (gubFact[FACT_ROBOT_READY_SECOND_TIME] == FALSE) + RecruitEPC( ROBOT ); + break; case NPC_ACTION_READY_ROBOT: