| Attached Files | isfireplatform.patch [^] (2,124 bytes) 2006-07-01 04:34 [Show Content] [Hide Content]Index: rts/Sim/Units/UnitDef.h
===================================================================
--- rts/Sim/Units/UnitDef.h (revision 1538)
+++ rts/Sim/Units/UnitDef.h (working copy)
@@ -172,7 +172,9 @@
float loadingRadius; //for transports
int transportCapacity;
int transportSize;
- bool isAirBase;// should the carried units still be able to shoot?
+ //$$
+ bool isfireplatform;// should the carried units still be able to shoot?
+ bool isAirBase;
float transportMass;
bool canCloak; //if the unit can cloak
Index: rts/Sim/Units/UnitDefHandler.cpp
===================================================================
--- rts/Sim/Units/UnitDefHandler.cpp (revision 1538)
+++ rts/Sim/Units/UnitDefHandler.cpp (working copy)
@@ -291,6 +291,7 @@
tdfparser.GetDef(ud.transportSize, "0", "UNITINFO\\transportsize");
tdfparser.GetDef(ud.transportCapacity, "0", "UNITINFO\\transportcapacity");
+ ud.isfireplatform=!!atoi(tdfparser.SGetValueDef("0", "UNITINFO\\isfireplatform").c_str()); //$$
ud.isAirBase=!!atoi(tdfparser.SGetValueDef("0", "UNITINFO\\isAirBase").c_str());
ud.loadingRadius=220;
tdfparser.GetDef(ud.transportMass, "100000", "UNITINFO\\TransportMass");
Index: rts/Sim/Units/UnitTypes/TransportUnit.cpp
===================================================================
--- rts/Sim/Units/UnitTypes/TransportUnit.cpp (revision 1538)
+++ rts/Sim/Units/UnitTypes/TransportUnit.cpp (working copy)
@@ -94,7 +94,7 @@
unit->AddDeathDependence (this);
unit->transporter = this;
unit->toBeTransported=false;
- if (!unitDef->isAirBase)
+ if (!unitDef->isfireplatform)//$$
unit->stunned=true; //make sure unit doesnt fire etc in transport
unit->UnBlock();
loshandler->FreeInstance(unit->los);
@@ -126,7 +126,7 @@
unit->transporter=0;
if(CTAAirMoveType* am=dynamic_cast<CTAAirMoveType*>(moveType))
unit->moveType->useHeading=true;
- unit->stunned=false; // de-stun in case it isairbase=0
+ unit->stunned=false; // de-stun in case it isfireplatform=0
unit->Block();
loshandler->MoveUnit(unit,false);
unit->moveType->LeaveTransport();
|