2020#include " GameLogic/PartitionManager.h"
2121#include " GameLogic/Module/PhysicsUpdate.h"
2222// #include "GameLogic/TerrainLogic.h"
23- // #include "GameLogic/Weapon.h"
23+ #include " GameLogic/Weapon.h"
24+ #include " Common/ObjectStatusTypes.h"
2425
2526#include " GameLogic/Module/CarrierDroneAIUpdate.h"
2627// #include "GameLogic/Module/JetAIUpdate.h"
@@ -96,7 +97,7 @@ UpdateSleepTime CarrierDroneAIUpdate::update()
9697
9798 // Init launch state (check contained status)
9899 if (!obj->isContained () && m_isContained && m_launchFrame == 0 ) {
99- DEBUG_LOG ((" >>> CarrierDroneAIUpdate::update() - Start Launch State %d" , obj->getID ()));
100+ // DEBUG_LOG((">>> CarrierDroneAIUpdate::update() - Start Launch State %d", obj->getID()));
100101 obj->setModelConditionState (MODELCONDITION_TAKEOFF);
101102 chooseLocomotorSet (data->m_launchingLoco );
102103 m_launchFrame = TheGameLogic->getFrame ();
@@ -106,14 +107,17 @@ UpdateSleepTime CarrierDroneAIUpdate::update()
106107 m_launchingSound.setObjectID (obj->getID ());
107108 m_launchingSound.setPlayingHandle (TheAudio->addAudioEvent (&m_launchingSound));
108109 }
110+
111+ // obj->setStatus(MAKE_OBJECT_STATUS_MASK(OBJECT_STATUS_NO_ATTACK));
112+ // obj->getCurrentWeapon()->setPossibleNextShotFrame(m_launchFrame + data->m_launchTime);
109113 }
110114 m_isContained = obj->isContained ();
111115
112116 // Exit launch state (check timer)
113117 if (m_launchFrame != 0 ) {
114118 UnsignedInt now = TheGameLogic->getFrame ();
115119 if (m_launchFrame + data->m_launchTime <= now) {
116- DEBUG_LOG ((" >>> CarrierDroneAIUpdate::update() - Stop Launch State %d" , obj->getID ()));
120+ // DEBUG_LOG((">>> CarrierDroneAIUpdate::update() - Stop Launch State %d", obj->getID()));
117121 obj->clearModelConditionState (MODELCONDITION_TAKEOFF);
118122 chooseLocomotorSet (LOCOMOTORSET_NORMAL);
119123 m_launchFrame = 0 ;
@@ -122,7 +126,14 @@ UpdateSleepTime CarrierDroneAIUpdate::update()
122126 {
123127 TheAudio->removeAudioEvent (m_launchingSound.getPlayingHandle ());
124128 }
129+
130+ // obj->clearStatus(MAKE_OBJECT_STATUS_MASK(OBJECT_STATUS_NO_ATTACK));
125131 }
132+ // else { // We are still launching
133+ // if (isAttacking()) {
134+ // return UPDATE_SLEEP_NONE;
135+ // }
136+ // }
126137 }
127138
128139
@@ -137,7 +148,7 @@ UpdateSleepTime CarrierDroneAIUpdate::update()
137148 Real dockingDistSquared = data->m_dockingDistance * data->m_dockingDistance ;
138149 if (getStateMachine ()->getCurrentStateID () == AI_ENTER && getGoalObject () != NULL ) {
139150 distanceToTargetSquared = ThePartitionManager->getDistanceSquared (obj, getGoalObject (), FROM_CENTER_2D);
140- DEBUG_LOG ((" CarrierDroneAIUpdate::update() - distance = %f" , sqrt (distanceToTargetSquared)));
151+ // DEBUG_LOG(("CarrierDroneAIUpdate::update() - distance = %f", sqrt(distanceToTargetSquared)));
141152 if (distanceToTargetSquared < dockingDistSquared) {
142153 isDocking = true ;
143154 }
@@ -146,7 +157,7 @@ UpdateSleepTime CarrierDroneAIUpdate::update()
146157 Locomotor* loco = getCurLocomotor ();
147158
148159 if (isDocking && !m_isDocking) {
149- DEBUG_LOG ((" >>> CarrierDroneAIUpdate::update() - ENTER LANDING STATE %d" , obj->getID ()));
160+ // DEBUG_LOG((">>> CarrierDroneAIUpdate::update() - ENTER LANDING STATE %d", obj->getID()));
150161
151162 // loco->setMaxSpeed(DOCKING_SPEED);
152163 chooseLocomotorSet (data->m_dockingLoco );
@@ -166,7 +177,7 @@ UpdateSleepTime CarrierDroneAIUpdate::update()
166177 m_isDocking = true ;
167178 }
168179 else if (!isDocking && m_isDocking) {
169- DEBUG_LOG ((" <<< CarrierDroneAIUpdate::update() - EXIT LANDING STATE %d" , obj->getID ()));
180+ // DEBUG_LOG(("<<< CarrierDroneAIUpdate::update() - EXIT LANDING STATE %d", obj->getID()));
170181
171182 obj->clearModelConditionState (MODELCONDITION_LANDING);
172183 // loco->setMaxSpeed(loco->getMaxSpeedForCondition(getObject()->getBodyModule()->getDamageState()));
0 commit comments