Update of /cvsroot/gcblue/gcb_wx/src/sim
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14318/src/sim
Modified Files:
Game.cpp tcAirObject.cpp tcFlightPort.cpp tcPlatformObject.cpp
tcStores.cpp
Log Message:
Index: tcPlatformObject.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** tcPlatformObject.cpp 23 Nov 2006 00:07:33 -0000 1.68
--- tcPlatformObject.cpp 2 Dec 2006 02:23:48 -0000 1.69
***************
*** 685,688 ****
--- 685,703 ----
}
+ /**
+ * @return true if any launchers are loading or unloading
+ */
+ bool tcPlatformObject::IsLoading() const
+ {
+ size_t nLaunchers = GetLauncherCount();
+ for (size_t n=0; n<nLaunchers; n++)
+ {
+ const tcLauncher* launcher = GetLauncher(n);
+ if (launcher->IsLoading()) return true;
+ }
+
+ return false;
+ }
+
void tcPlatformObject::UnloadAllLaunchers()
{
Index: Game.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v
retrieving revision 1.164
retrieving revision 1.165
diff -C2 -d -r1.164 -r1.165
*** Game.cpp 23 Nov 2006 00:07:33 -0000 1.164
--- Game.cpp 2 Dec 2006 02:23:48 -0000 1.165
***************
*** 620,623 ****
--- 620,624 ----
chatBox->SetBaseRenderBin(40);
chatBox->SetActive(false);
+ chatBox->SetDragable(true);
***************
*** 1159,1164 ****
oobView->AttachMapView(tacticalMap);
- oobView->mnAlliance = userInfo->GetOwnAlliance(); // TODO: make this configurable
-
// popupControl init
--- 1160,1163 ----
Index: tcStores.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcStores.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** tcStores.cpp 23 Nov 2006 00:07:33 -0000 1.17
--- tcStores.cpp 2 Dec 2006 02:23:49 -0000 1.18
***************
*** 541,546 ****
tcGameObject* obj = GetChildOrParent(op.obj);
! wxASSERT(obj);
! if (obj == 0)
{
return;
--- 541,546 ----
tcGameObject* obj = GetChildOrParent(op.obj);
!
! if (obj == 0) // object left or destroyed
{
return;
Index: tcFlightPort.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** tcFlightPort.cpp 27 Nov 2006 00:46:40 -0000 1.31
--- tcFlightPort.cpp 2 Dec 2006 02:23:48 -0000 1.32
***************
*** 1314,1317 ****
--- 1314,1327 ----
{
tcAirState *airstate = units.at(n);
+
+ bool moveable = false;
+ if (tcAirObject* air = dynamic_cast<tcAirObject*>(airstate->obj))
+ {
+ moveable = !air->IsRefueling() && !air->IsLoading();
+ }
+ else
+ {
+ wxASSERT(false);
+ }
/* if the unit is not in transit and is not at goal location,
***************
*** 1319,1323 ****
** goal location, then take spot and set current location to TRANSIT */
bool inTransit = airstate->inTransit;
! if ((!inTransit)&&(airstate->current_location != airstate->goal_location))
{
if ((airstate->goal_location == TAKEOFF) && (airstate->current_location == LAUNCH))
--- 1329,1334 ----
** goal location, then take spot and set current location to TRANSIT */
bool inTransit = airstate->inTransit;
!
! if ((!inTransit) && moveable && (airstate->current_location != airstate->goal_location))
{
if ((airstate->goal_location == TAKEOFF) && (airstate->current_location == LAUNCH))
Index: tcAirObject.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAirObject.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** tcAirObject.cpp 1 Dec 2006 03:39:54 -0000 1.34
--- tcAirObject.cpp 2 Dec 2006 02:23:48 -0000 1.35
***************
*** 71,74 ****
--- 71,76 ----
stream >> maxPitch_rad;
+ UpdateLoadoutTag();
+
return stream;
}
|