parent
c91f51a3cf
commit
fcede64e42
|
@ -364,6 +364,6 @@ SK-Mantis-VTOL-HBB,743,Body12SUP,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNU
|
||||||
SK-Retre-VTOL-HBB,744,Body7ABT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
SK-Retre-VTOL-HBB,744,Body7ABT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
||||||
SK-Retal-VTOL-Scourge,745,Body3MBT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
SK-Retal-VTOL-Scourge,745,Body3MBT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
||||||
SK-Retre-VTOL-Plasmite,746,Body7ABT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
SK-Retre-VTOL-Plasmite,746,Body7ABT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,V-Tol,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
||||||
SuperTransport,746,SuperTransportBody,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,YES,V-Tol,ZNULLREPAIR,TRANSPORTER,DefaultSensor1Mk1,1
|
SuperTransport,746,SuperTransportBody,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,YES,V-Tol,ZNULLREPAIR,SUPERTRANSPORTER,DefaultSensor1Mk1,1
|
||||||
SK-Veng-Hover-Seraph,747,Body10MBT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,hover01,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
SK-Veng-Hover-Seraph,747,Body10MBT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,hover01,ZNULLREPAIR,DROID,DefaultSensor1Mk1,1
|
||||||
Dragon-Hover-SeraphGauss,748,Body14SUP,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,hover01,ZNULLREPAIR,DROID,DefaultSensor1Mk1,2
|
Dragon-Hover-SeraphGauss,748,Body14SUP,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,hover01,ZNULLREPAIR,DROID,DefaultSensor1Mk1,2
|
||||||
|
|
|
@ -406,7 +406,7 @@ bool actionTargetTurret(BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, WEAPON *
|
||||||
{
|
{
|
||||||
DROID *psDroid = (DROID *)psAttacker;
|
DROID *psDroid = (DROID *)psAttacker;
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_WEAPON || psDroid->droidType == DROID_TRANSPORTER
|
if (psDroid->droidType == DROID_WEAPON || psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER
|
||||||
|| psDroid->droidType == DROID_COMMAND || psDroid->droidType == DROID_CYBORG
|
|| psDroid->droidType == DROID_COMMAND || psDroid->droidType == DROID_CYBORG
|
||||||
|| psDroid->droidType == DROID_CYBORG_SUPER)
|
|| psDroid->droidType == DROID_CYBORG_SUPER)
|
||||||
{
|
{
|
||||||
|
@ -2220,7 +2220,7 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction)
|
||||||
// can't attack without a weapon
|
// can't attack without a weapon
|
||||||
// or yourself
|
// or yourself
|
||||||
if ((psDroid->asWeaps[0].nStat == 0) ||
|
if ((psDroid->asWeaps[0].nStat == 0) ||
|
||||||
(psDroid->droidType == DROID_TRANSPORTER) ||
|
(psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) ||
|
||||||
(psAction->psObj == psDroid))
|
(psAction->psObj == psDroid))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -2241,7 +2241,7 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction)
|
||||||
//in multiPlayer cannot electronically attack a tranporter
|
//in multiPlayer cannot electronically attack a tranporter
|
||||||
if (bMultiPlayer
|
if (bMultiPlayer
|
||||||
&& psAction->psObj->type == OBJ_DROID
|
&& psAction->psObj->type == OBJ_DROID
|
||||||
&& ((DROID *)psAction->psObj)->droidType == DROID_TRANSPORTER)
|
&& (((DROID *)psAction->psObj)->droidType == DROID_TRANSPORTER || ((DROID *)psAction->psObj)->droidType == DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
psDroid->action = DACTION_NONE;
|
psDroid->action = DACTION_NONE;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -353,6 +353,7 @@ static SDWORD targetAttackWeight(BASE_OBJECT *psTarget, BASE_OBJECT *psAttacker,
|
||||||
case DROID_ECM:
|
case DROID_ECM:
|
||||||
case DROID_PERSON:
|
case DROID_PERSON:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_ANY:
|
case DROID_ANY:
|
||||||
break;
|
break;
|
||||||
|
@ -579,7 +580,7 @@ int aiBestNearestTarget(DROID *psDroid, BASE_OBJECT **ppsObj, int weapon_slot, i
|
||||||
// if not electronic then valid target
|
// if not electronic then valid target
|
||||||
if (!electronic
|
if (!electronic
|
||||||
|| (electronic
|
|| (electronic
|
||||||
&& ((DROID *)targetInQuestion)->droidType != DROID_TRANSPORTER))
|
&& (((DROID *)targetInQuestion)->droidType != DROID_TRANSPORTER && ((DROID *)targetInQuestion)->droidType != DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
//only a valid target if NOT a transporter
|
//only a valid target if NOT a transporter
|
||||||
psTarget = targetInQuestion;
|
psTarget = targetInQuestion;
|
||||||
|
|
|
@ -673,6 +673,7 @@ static void displayCompObj(DROID *psDroid, bool bButton)
|
||||||
{
|
{
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
case DROID_CYBORG:
|
case DROID_CYBORG:
|
||||||
case DROID_CYBORG_SUPER:
|
case DROID_CYBORG_SUPER:
|
||||||
case DROID_WEAPON:
|
case DROID_WEAPON:
|
||||||
|
@ -1002,7 +1003,7 @@ void displayComponentObject(DROID *psDroid)
|
||||||
position.z = -(st.pos.y - player.p.z);
|
position.z = -(st.pos.y - player.p.z);
|
||||||
position.y = st.pos.z;
|
position.y = st.pos.z;
|
||||||
|
|
||||||
if(psDroid->droidType == DROID_TRANSPORTER)
|
if(psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
position.y += bobTransporterHeight();
|
position.y += bobTransporterHeight();
|
||||||
}
|
}
|
||||||
|
|
|
@ -889,6 +889,7 @@ void desSetupDesignTemplates(void)
|
||||||
* cyborg, person or command droid,
|
* cyborg, person or command droid,
|
||||||
*/
|
*/
|
||||||
if (psTempl->droidType != DROID_TRANSPORTER &&
|
if (psTempl->droidType != DROID_TRANSPORTER &&
|
||||||
|
psTempl->droidType != DROID_SUPERTRANSPORTER &&
|
||||||
psTempl->droidType != DROID_CYBORG &&
|
psTempl->droidType != DROID_CYBORG &&
|
||||||
psTempl->droidType != DROID_CYBORG_SUPER &&
|
psTempl->droidType != DROID_CYBORG_SUPER &&
|
||||||
psTempl->droidType != DROID_CYBORG_CONSTRUCT &&
|
psTempl->droidType != DROID_CYBORG_CONSTRUCT &&
|
||||||
|
@ -1302,6 +1303,11 @@ const char *GetDefaultTemplateName(DROID_TEMPLATE *psTemplate)
|
||||||
sstrcpy(aCurrName, _("Transport"));
|
sstrcpy(aCurrName, _("Transport"));
|
||||||
return aCurrName;
|
return aCurrName;
|
||||||
}
|
}
|
||||||
|
if(psTemplate->droidType == DROID_SUPERTRANSPORTER)
|
||||||
|
{
|
||||||
|
sstrcpy(aCurrName, _("Super Transport"));
|
||||||
|
return aCurrName;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Now get the normal default droid name based on its components
|
Now get the normal default droid name based on its components
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
|
|
||||||
struct _dragBox dragBox3D,wallDrag;
|
struct _dragBox dragBox3D,wallDrag;
|
||||||
|
|
||||||
#define POSSIBLE_SELECTIONS 13
|
#define POSSIBLE_SELECTIONS 14
|
||||||
#define POSSIBLE_TARGETS 23
|
#define POSSIBLE_TARGETS 23
|
||||||
|
|
||||||
extern char DROIDDOING[512]; // holds the string on what the droid is doing
|
extern char DROIDDOING[512]; // holds the string on what the droid is doing
|
||||||
|
@ -779,7 +779,7 @@ void processMouseClickInput(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!bMultiPlayer && establishSelection(selectedPlayer) == SC_DROID_TRANSPORTER)
|
if (!bMultiPlayer && (establishSelection(selectedPlayer) == SC_DROID_TRANSPORTER || establishSelection(selectedPlayer) == SC_DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
// Never, *ever* let user control the transport in SP games--it breaks the scripts!
|
// Never, *ever* let user control the transport in SP games--it breaks the scripts!
|
||||||
ASSERT(game.type == CAMPAIGN, "Game type was set incorrectly!");
|
ASSERT(game.type == CAMPAIGN, "Game type was set incorrectly!");
|
||||||
|
@ -1012,7 +1012,7 @@ void processMouseClickInput(void)
|
||||||
item = MT_BLOCKING;
|
item = MT_BLOCKING;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (specialOrderKeyDown() && selection == SC_DROID_TRANSPORTER &&
|
if (specialOrderKeyDown() && (selection == SC_DROID_TRANSPORTER || selection == SC_DROID_SUPERTRANSPORTER) &&
|
||||||
arnMPointers[item][selection] == CURSOR_MOVE && bMultiPlayer)
|
arnMPointers[item][selection] == CURSOR_MOVE && bMultiPlayer)
|
||||||
{
|
{
|
||||||
// Alt+move = disembark transporter
|
// Alt+move = disembark transporter
|
||||||
|
@ -1705,7 +1705,7 @@ static void dealWithLMBDroid(DROID* psDroid, SELECTION_TYPE selection)
|
||||||
FeedbackOrderGiven();
|
FeedbackOrderGiven();
|
||||||
driveDisableTactical();
|
driveDisableTactical();
|
||||||
}
|
}
|
||||||
else if (psDroid->droidType == DROID_TRANSPORTER)
|
else if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
if (selection == SC_INVALID)
|
if (selection == SC_INVALID)
|
||||||
{
|
{
|
||||||
|
@ -2358,7 +2358,7 @@ static void dealWithRMB( void )
|
||||||
dealWithDroidSelect(psDroid, false);
|
dealWithDroidSelect(psDroid, false);
|
||||||
}
|
}
|
||||||
// Not a transporter
|
// Not a transporter
|
||||||
else if (psDroid->droidType != DROID_TRANSPORTER)
|
else if (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
if (bRightClickOrders)
|
if (bRightClickOrders)
|
||||||
{
|
{
|
||||||
|
@ -2567,7 +2567,7 @@ static void dealWithRMB( void )
|
||||||
{
|
{
|
||||||
if (psDroid->selected)
|
if (psDroid->selected)
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
orderDroidLoc(psDroid, DORDER_DISEMBARK, mouseTileX *
|
orderDroidLoc(psDroid, DORDER_DISEMBARK, mouseTileX *
|
||||||
TILE_UNITS + TILE_UNITS/2, mouseTileY * TILE_UNITS +
|
TILE_UNITS + TILE_UNITS/2, mouseTileY * TILE_UNITS +
|
||||||
|
@ -2653,7 +2653,7 @@ STRUCTURE *psStructure;
|
||||||
retVal = MT_SENSOR;
|
retVal = MT_SENSOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (psDroid->droidType == DROID_TRANSPORTER &&
|
else if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) &&
|
||||||
selectedPlayer == psDroid->player)
|
selectedPlayer == psDroid->player)
|
||||||
{
|
{
|
||||||
//check the transporter is not full
|
//check the transporter is not full
|
||||||
|
@ -2836,7 +2836,7 @@ STRUCTURE *psStructure;
|
||||||
// enum in DroidDef.h
|
// enum in DroidDef.h
|
||||||
//
|
//
|
||||||
//#define NUM_DROID_WEIGHTS (10)
|
//#define NUM_DROID_WEIGHTS (10)
|
||||||
#define NUM_DROID_WEIGHTS (13)
|
#define NUM_DROID_WEIGHTS (14)
|
||||||
UBYTE DroidSelectionWeights[NUM_DROID_WEIGHTS] = {
|
UBYTE DroidSelectionWeights[NUM_DROID_WEIGHTS] = {
|
||||||
3, //DROID_WEAPON,
|
3, //DROID_WEAPON,
|
||||||
1, //DROID_SENSOR,
|
1, //DROID_SENSOR,
|
||||||
|
@ -2845,6 +2845,7 @@ UBYTE DroidSelectionWeights[NUM_DROID_WEIGHTS] = {
|
||||||
3, //DROID_PERSON,
|
3, //DROID_PERSON,
|
||||||
3, //DROID_CYBORG,
|
3, //DROID_CYBORG,
|
||||||
9, //DROID_TRANSPORTER,
|
9, //DROID_TRANSPORTER,
|
||||||
|
10, //DROID_SUPERTRANSPORTER
|
||||||
0, //DROID_COMMAND,
|
0, //DROID_COMMAND,
|
||||||
4, //DROID_REPAIR,
|
4, //DROID_REPAIR,
|
||||||
5, //DROID_DEFAULT,
|
5, //DROID_DEFAULT,
|
||||||
|
@ -2943,6 +2944,7 @@ SELECTION_TYPE selectionClass;
|
||||||
selectionClass = SC_DROID_DIRECT;
|
selectionClass = SC_DROID_DIRECT;
|
||||||
break;
|
break;
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
//can remove this is NEVER going to select the Transporter to move
|
//can remove this is NEVER going to select the Transporter to move
|
||||||
//Never say Never!! cos here we go in multiPlayer!!
|
//Never say Never!! cos here we go in multiPlayer!!
|
||||||
selectionClass = SC_DROID_TRANSPORTER;
|
selectionClass = SC_DROID_TRANSPORTER;
|
||||||
|
|
|
@ -130,6 +130,7 @@ SC_DROID_RECOVERY,
|
||||||
SC_DROID_COMMAND,
|
SC_DROID_COMMAND,
|
||||||
SC_DROID_BOMBER,
|
SC_DROID_BOMBER,
|
||||||
SC_DROID_TRANSPORTER,
|
SC_DROID_TRANSPORTER,
|
||||||
|
SC_DROID_SUPERTRANSPORTER,
|
||||||
SC_DROID_DEMOLISH,
|
SC_DROID_DEMOLISH,
|
||||||
SC_DROID_REPAIR,
|
SC_DROID_REPAIR,
|
||||||
SC_INVALID,
|
SC_INVALID,
|
||||||
|
|
|
@ -2727,7 +2727,7 @@ void renderShadow( DROID *psDroid, iIMDShape *psShadowIMD )
|
||||||
Vector3i dv;
|
Vector3i dv;
|
||||||
|
|
||||||
dv.x = psDroid->pos.x - player.p.x;
|
dv.x = psDroid->pos.x - player.p.x;
|
||||||
if(psDroid->droidType == DROID_TRANSPORTER)
|
if(psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
dv.x -= bobTransporterHeight()/2;
|
dv.x -= bobTransporterHeight()/2;
|
||||||
}
|
}
|
||||||
|
@ -3596,7 +3596,7 @@ void calcScreenCoords(DROID *psDroid)
|
||||||
const int cZ = pie_RotateProject(&origin, ¢er);
|
const int cZ = pie_RotateProject(&origin, ¢er);
|
||||||
|
|
||||||
// TODO: compute the droid's radius (using min/max for x,y,z)
|
// TODO: compute the droid's radius (using min/max for x,y,z)
|
||||||
if(psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
radius = 45;
|
radius = 45;
|
||||||
}
|
}
|
||||||
|
@ -3618,7 +3618,7 @@ void calcScreenCoords(DROID *psDroid)
|
||||||
{
|
{
|
||||||
//don't allow Transporter Droids to be selected here
|
//don't allow Transporter Droids to be selected here
|
||||||
//unless we're in multiPlayer mode!!!!
|
//unless we're in multiPlayer mode!!!!
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER || bMultiPlayer)
|
if ((psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER) || bMultiPlayer)
|
||||||
{
|
{
|
||||||
dealWithDroidSelect(psDroid, true);
|
dealWithDroidSelect(psDroid, true);
|
||||||
}
|
}
|
||||||
|
|
118
src/drive.cpp
118
src/drive.cpp
|
@ -156,7 +156,6 @@ bool getDrivingStatus( void )
|
||||||
//
|
//
|
||||||
bool StartDriverMode(DROID *psOldDroid)
|
bool StartDriverMode(DROID *psOldDroid)
|
||||||
{
|
{
|
||||||
DROID *psDroid;
|
|
||||||
DROID *psLastDriven;
|
DROID *psLastDriven;
|
||||||
|
|
||||||
IdleTime = gameTime;
|
IdleTime = gameTime;
|
||||||
|
@ -165,44 +164,52 @@ bool StartDriverMode(DROID *psOldDroid)
|
||||||
psDrivenDroid = NULL;
|
psDrivenDroid = NULL;
|
||||||
|
|
||||||
// Find a selected droid and make that the driven one.
|
// Find a selected droid and make that the driven one.
|
||||||
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
for(DROID *psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if(psDroid->selected) {
|
if(psDroid->selected)
|
||||||
if((psDrivenDroid == NULL) && (psDroid != psOldDroid)) {
|
{
|
||||||
|
if ((psDrivenDroid == NULL) && (psDroid != psOldDroid))
|
||||||
|
{
|
||||||
// The first droid found becomes the driven droid.
|
// The first droid found becomes the driven droid.
|
||||||
if(!(DroidIsBuilding(psDroid) || DroidGoingToBuild(psDroid))) {
|
if (!(DroidIsBuilding(psDroid) || DroidGoingToBuild(psDroid)))
|
||||||
// psDroid->sMove.Status = MOVEDRIVE;
|
{
|
||||||
|
// psDroid->sMove.Status = MOVEDRIVE;
|
||||||
}
|
}
|
||||||
psDrivenDroid = psDroid;
|
psDrivenDroid = psDroid;
|
||||||
debug( LOG_NEVER, "New driven droid\n" );
|
debug( LOG_NEVER, "New driven droid" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If that failed then find any droid and make it the driven one.
|
// If that failed then find any droid and make it the driven one.
|
||||||
if(psDrivenDroid == NULL) {
|
if (psDrivenDroid == NULL)
|
||||||
|
{
|
||||||
psLastDriven = NULL;
|
psLastDriven = NULL;
|
||||||
psDrivenDroid = intGotoNextDroidType(NULL,DROID_ANY,true);
|
psDrivenDroid = intGotoNextDroidType(NULL,DROID_ANY,true);
|
||||||
|
|
||||||
// If it's the same droid then try again
|
// If it's the same droid then try again
|
||||||
if(psDrivenDroid == psOldDroid) {
|
if(psDrivenDroid == psOldDroid)
|
||||||
|
{
|
||||||
psDrivenDroid = intGotoNextDroidType(NULL,DROID_ANY,true);
|
psDrivenDroid = intGotoNextDroidType(NULL,DROID_ANY,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(psDrivenDroid == psOldDroid) {
|
if(psDrivenDroid == psOldDroid)
|
||||||
|
{
|
||||||
psDrivenDroid = NULL;
|
psDrivenDroid = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it failed then try for a transporter.
|
// If it failed then try for a transporter.
|
||||||
if(psDrivenDroid == NULL) {
|
if(psDrivenDroid == NULL)
|
||||||
psDrivenDroid = intGotoNextDroidType(NULL,DROID_TRANSPORTER,true);
|
{
|
||||||
|
// FIXME: for DROID_SUPER_TRANSPORTER
|
||||||
|
psDrivenDroid = intGotoNextDroidType(NULL, DROID_TRANSPORTER, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DBPRINTF(("Selected a new driven droid : %p\n",psDrivenDroid));
|
// DBPRINTF(("Selected a new driven droid : %p\n",psDrivenDroid));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(psDrivenDroid) {
|
if(psDrivenDroid)
|
||||||
|
{
|
||||||
driveDir = UNDEG(psDrivenDroid->rot.direction);
|
driveDir = UNDEG(psDrivenDroid->rot.direction);
|
||||||
driveSpeed = 0;
|
driveSpeed = 0;
|
||||||
driveBumpTime = gameTime;
|
driveBumpTime = gameTime;
|
||||||
|
@ -211,7 +218,7 @@ bool StartDriverMode(DROID *psOldDroid)
|
||||||
|
|
||||||
if(DriveInterfaceEnabled)
|
if(DriveInterfaceEnabled)
|
||||||
{
|
{
|
||||||
debug( LOG_NEVER, "Interface enabled1 ! Disabling drive control\n" );
|
debug( LOG_NEVER, "Interface enabled1 ! Disabling drive control" );
|
||||||
DriveControlEnabled = false;
|
DriveControlEnabled = false;
|
||||||
DirectControl = false;
|
DirectControl = false;
|
||||||
}
|
}
|
||||||
|
@ -221,15 +228,13 @@ bool StartDriverMode(DROID *psOldDroid)
|
||||||
DirectControl = true; // we are taking over the unit.
|
DirectControl = true; // we are taking over the unit.
|
||||||
}
|
}
|
||||||
|
|
||||||
if(psLastDriven != psDrivenDroid) {
|
if(psLastDriven != psDrivenDroid)
|
||||||
debug( LOG_NEVER, "camAllignWithTarget\n" );
|
{
|
||||||
|
debug( LOG_NEVER, "camAllignWithTarget" );
|
||||||
camAllignWithTarget((BASE_OBJECT*)psDrivenDroid);
|
camAllignWithTarget((BASE_OBJECT*)psDrivenDroid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -240,16 +245,18 @@ static void ChangeDriver(void)
|
||||||
{
|
{
|
||||||
DROID *psDroid;
|
DROID *psDroid;
|
||||||
|
|
||||||
if(psDrivenDroid != NULL) {
|
if(psDrivenDroid != NULL)
|
||||||
|
{
|
||||||
debug( LOG_NEVER, "Driver Changed\n" );
|
debug( LOG_NEVER, "Driver Changed\n" );
|
||||||
|
|
||||||
// audio_StopObjTrack(psDrivenDroid,ID_SOUND_SMALL_DROID_RUN);
|
// audio_StopObjTrack(psDrivenDroid,ID_SOUND_SMALL_DROID_RUN);
|
||||||
|
|
||||||
// psDrivenDroid = NULL;
|
// psDrivenDroid = NULL;
|
||||||
|
|
||||||
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext) {
|
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
||||||
if( (psDroid->sMove.Status == MOVEDRIVE) ) {
|
{
|
||||||
ASSERT( (psDroid->droidType != DROID_TRANSPORTER),"Tried to control a transporter" );
|
if (psDroid->sMove.Status == MOVEDRIVE)
|
||||||
|
{
|
||||||
|
ASSERT((psDroid->droidType != DROID_TRANSPORTER || psDroid->droidType != DROID_SUPERTRANSPORTER), "Tried to control a transporter" );
|
||||||
secondarySetState(psDroid, DSO_HALTTYPE, DSS_HALT_GUARD);
|
secondarySetState(psDroid, DSO_HALTTYPE, DSS_HALT_GUARD);
|
||||||
psDroid->sMove.Status = MOVEINACTIVE;
|
psDroid->sMove.Status = MOVEINACTIVE;
|
||||||
}
|
}
|
||||||
|
@ -269,15 +276,17 @@ void StopDriverMode(void)
|
||||||
|
|
||||||
if(psDrivenDroid != NULL)
|
if(psDrivenDroid != NULL)
|
||||||
{
|
{
|
||||||
debug( LOG_NEVER, "Drive mode canceled\n" );
|
debug( LOG_NEVER, "Drive mode canceled" );
|
||||||
addConsoleMessage("Driver mode canceled.", LEFT_JUSTIFY,SYSTEM_MESSAGE);
|
addConsoleMessage("Driver mode canceled.", LEFT_JUSTIFY,SYSTEM_MESSAGE);
|
||||||
// audio_StopObjTrack(psDrivenDroid,ID_SOUND_SMALL_DROID_RUN);
|
// audio_StopObjTrack(psDrivenDroid,ID_SOUND_SMALL_DROID_RUN);
|
||||||
|
|
||||||
psDrivenDroid = NULL;
|
psDrivenDroid = NULL;
|
||||||
|
|
||||||
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext) {
|
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
||||||
if( (psDroid->sMove.Status == MOVEDRIVE) ) {
|
{
|
||||||
ASSERT( (psDroid->droidType != DROID_TRANSPORTER),"Tried to control a transporter" );
|
if (psDroid->sMove.Status == MOVEDRIVE)
|
||||||
|
{
|
||||||
|
ASSERT((psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER), "Tried to control a transporter");
|
||||||
secondarySetState(psDroid, DSO_HALTTYPE, DSS_HALT_GUARD);
|
secondarySetState(psDroid, DSO_HALTTYPE, DSS_HALT_GUARD);
|
||||||
psDroid->sMove.Status = MOVEINACTIVE;
|
psDroid->sMove.Status = MOVEINACTIVE;
|
||||||
}
|
}
|
||||||
|
@ -504,9 +513,11 @@ void driveUpdate(void)
|
||||||
|
|
||||||
AllInRange = true;
|
AllInRange = true;
|
||||||
|
|
||||||
if(DirectControl) {
|
if (DirectControl)
|
||||||
if(psDrivenDroid != NULL) {
|
{
|
||||||
if(bMultiMessages && (driveBumpTime < gameTime)) // send latest info about driven droid.
|
if (psDrivenDroid != NULL)
|
||||||
|
{
|
||||||
|
if (bMultiMessages && (driveBumpTime < gameTime)) // send latest info about driven droid.
|
||||||
{
|
{
|
||||||
sendDroidInfo(psDrivenDroid, DroidOrder(DORDER_MOVE, removeZ(psDrivenDroid->pos)), false);
|
sendDroidInfo(psDrivenDroid, DroidOrder(DORDER_MOVE, removeZ(psDrivenDroid->pos)), false);
|
||||||
}
|
}
|
||||||
|
@ -517,39 +528,43 @@ void driveUpdate(void)
|
||||||
|
|
||||||
|
|
||||||
// Check the driven droid is still selected
|
// Check the driven droid is still selected
|
||||||
if(psDrivenDroid->selected == false) {
|
if (psDrivenDroid->selected == false)
|
||||||
|
{
|
||||||
// if it's not then reset the driving system.
|
// if it's not then reset the driving system.
|
||||||
driveSelectionChanged();
|
driveSelectionChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the driven droid.
|
// Update the driven droid.
|
||||||
if(driveControl(psDrivenDroid)) {
|
if (driveControl(psDrivenDroid))
|
||||||
|
{
|
||||||
// If control did something then force the droid's move status.
|
// If control did something then force the droid's move status.
|
||||||
if(psDrivenDroid->sMove.Status != MOVEDRIVE) {
|
if (psDrivenDroid->sMove.Status != MOVEDRIVE)
|
||||||
|
{
|
||||||
psDrivenDroid->sMove.Status = MOVEDRIVE;
|
psDrivenDroid->sMove.Status = MOVEDRIVE;
|
||||||
ASSERT( (psDrivenDroid->droidType != DROID_TRANSPORTER),"Tried to control a transporter" );
|
ASSERT((psDrivenDroid->droidType != DROID_TRANSPORTER && psDrivenDroid->droidType != DROID_SUPERTRANSPORTER), "Tried to control a transporter");
|
||||||
driveDir = UNDEG(psDrivenDroid->rot.direction);
|
driveDir = UNDEG(psDrivenDroid->rot.direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoFollowRangeCheck = true;
|
DoFollowRangeCheck = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the driven droid under user control?
|
// Is the driven droid under user control?
|
||||||
if(psDrivenDroid->sMove.Status == MOVEDRIVE) {
|
if (psDrivenDroid->sMove.Status == MOVEDRIVE)
|
||||||
|
{
|
||||||
// Is it a command droid
|
// Is it a command droid
|
||||||
if( (psDrivenDroid->droidType == DROID_COMMAND) &&
|
if ((psDrivenDroid->droidType == DROID_COMMAND) &&
|
||||||
(psDrivenDroid->psGroup != NULL) ) {
|
(psDrivenDroid->psGroup != NULL))
|
||||||
|
{
|
||||||
driveMoveCommandFollowers(psDrivenDroid);
|
driveMoveCommandFollowers(psDrivenDroid);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext) {
|
for (psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
||||||
|
{
|
||||||
psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
|
psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
|
||||||
|
|
||||||
if( (psDroid->selected) &&
|
if ((psDroid->selected) &&
|
||||||
(psDroid != psDrivenDroid) &&
|
(psDroid != psDrivenDroid) &&
|
||||||
(psDroid->droidType != DROID_TRANSPORTER) &&
|
(psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER) &&
|
||||||
//((psPropStats->propulsionType != PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_CYBORG)) ) {
|
//((psPropStats->propulsionType != PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_CYBORG)) ) {
|
||||||
((psPropStats->propulsionType != PROPULSION_TYPE_LIFT) || cyborgDroid(psDroid)) )
|
((psPropStats->propulsionType != PROPULSION_TYPE_LIFT) || cyborgDroid(psDroid)) )
|
||||||
{
|
{
|
||||||
|
@ -559,16 +574,21 @@ void driveUpdate(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(AllInRange) {
|
if (AllInRange)
|
||||||
|
{
|
||||||
DoFollowRangeCheck = false;
|
DoFollowRangeCheck = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(driveBumpTime < gameTime) {
|
if(driveBumpTime < gameTime)
|
||||||
|
{
|
||||||
// Send next order in 1 second.
|
// Send next order in 1 second.
|
||||||
driveBumpTime = gameTime+GAME_TICKS_PER_SEC;
|
driveBumpTime = gameTime+GAME_TICKS_PER_SEC;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if(StartDriverMode(NULL) == false) {
|
else
|
||||||
|
{
|
||||||
|
if (StartDriverMode(NULL) == false)
|
||||||
|
{
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ int32_t droidDamage(DROID *psDroid, unsigned damage, WEAPON_CLASS weaponClass, W
|
||||||
else if (relativeDamage < 0)
|
else if (relativeDamage < 0)
|
||||||
{
|
{
|
||||||
// HACK: Prevent transporters from being destroyed in single player
|
// HACK: Prevent transporters from being destroyed in single player
|
||||||
if ( (game.type == CAMPAIGN) && !bMultiPlayer && (psDroid->droidType == DROID_TRANSPORTER) )
|
if ((game.type == CAMPAIGN) && !bMultiPlayer && (psDroid->droidType == DROID_TRANSPORTER))
|
||||||
{
|
{
|
||||||
debug(LOG_ATTACK, "Transport(%d) saved from death--since it should never die (SP only)", psDroid->id);
|
debug(LOG_ATTACK, "Transport(%d) saved from death--since it should never die (SP only)", psDroid->id);
|
||||||
psDroid->body = 1;
|
psDroid->body = 1;
|
||||||
|
@ -318,13 +318,12 @@ DROID::~DROID()
|
||||||
psDroid->psCurAnim = NULL;
|
psDroid->psCurAnim = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
if (psDroid->psGroup)
|
if (psDroid->psGroup)
|
||||||
{
|
{
|
||||||
//free all droids associated with this Transporter
|
//free all droids associated with this Transporter
|
||||||
for (psCurr = psDroid->psGroup->psList; psCurr != NULL && psCurr !=
|
for (psCurr = psDroid->psGroup->psList; psCurr != NULL && psCurr != psDroid; psCurr = psNext)
|
||||||
psDroid; psCurr = psNext)
|
|
||||||
{
|
{
|
||||||
psNext = psCurr->psGrpNext;
|
psNext = psCurr->psGrpNext;
|
||||||
delete psCurr;
|
delete psCurr;
|
||||||
|
@ -419,13 +418,12 @@ void removeDroidBase(DROID *psDel)
|
||||||
}
|
}
|
||||||
|
|
||||||
//kill all the droids inside the transporter
|
//kill all the droids inside the transporter
|
||||||
if (psDel->droidType == DROID_TRANSPORTER)
|
if (psDel->droidType == DROID_TRANSPORTER || psDel->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
if (psDel->psGroup)
|
if (psDel->psGroup)
|
||||||
{
|
{
|
||||||
//free all droids associated with this Transporter
|
//free all droids associated with this Transporter
|
||||||
for (psCurr = psDel->psGroup->psList; psCurr != NULL && psCurr !=
|
for (psCurr = psDel->psGroup->psList; psCurr != NULL && psCurr != psDel; psCurr = psNext)
|
||||||
psDel; psCurr = psNext)
|
|
||||||
{
|
{
|
||||||
psNext = psCurr->psGrpNext;
|
psNext = psCurr->psGrpNext;
|
||||||
|
|
||||||
|
@ -588,7 +586,7 @@ bool droidRemove(DROID *psDroid, DROID *pList[MAX_PLAYERS])
|
||||||
}
|
}
|
||||||
|
|
||||||
// leave the current group if any - not if its a Transporter droid
|
// leave the current group if any - not if its a Transporter droid
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER && psDroid->psGroup)
|
if ((psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER) && psDroid->psGroup)
|
||||||
{
|
{
|
||||||
psDroid->psGroup->remove(psDroid);
|
psDroid->psGroup->remove(psDroid);
|
||||||
psDroid->psGroup = NULL;
|
psDroid->psGroup = NULL;
|
||||||
|
@ -1429,7 +1427,8 @@ DROID_TYPE droidTemplateType(DROID_TEMPLATE *psTemplate)
|
||||||
psTemplate->droidType == DROID_CYBORG_SUPER ||
|
psTemplate->droidType == DROID_CYBORG_SUPER ||
|
||||||
psTemplate->droidType == DROID_CYBORG_CONSTRUCT ||
|
psTemplate->droidType == DROID_CYBORG_CONSTRUCT ||
|
||||||
psTemplate->droidType == DROID_CYBORG_REPAIR ||
|
psTemplate->droidType == DROID_CYBORG_REPAIR ||
|
||||||
psTemplate->droidType == DROID_TRANSPORTER)
|
psTemplate->droidType == DROID_TRANSPORTER ||
|
||||||
|
psTemplate->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
type = psTemplate->droidType;
|
type = psTemplate->droidType;
|
||||||
}
|
}
|
||||||
|
@ -1855,7 +1854,7 @@ DROID *reallyBuildDroid(DROID_TEMPLATE *pTemplate, Position pos, UDWORD player,
|
||||||
psDroid->pos.z = map_Height(psDroid->pos.x, psDroid->pos.y);
|
psDroid->pos.z = map_Height(psDroid->pos.x, psDroid->pos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_COMMAND)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER || psDroid->droidType == DROID_COMMAND)
|
||||||
{
|
{
|
||||||
psGrp = grpCreate();
|
psGrp = grpCreate();
|
||||||
psGrp->add(psDroid);
|
psGrp->add(psDroid);
|
||||||
|
@ -1879,7 +1878,8 @@ DROID *reallyBuildDroid(DROID_TEMPLATE *pTemplate, Position pos, UDWORD player,
|
||||||
(psDroid->droidType != DROID_CYBORG_CONSTRUCT) &&
|
(psDroid->droidType != DROID_CYBORG_CONSTRUCT) &&
|
||||||
(psDroid->droidType != DROID_REPAIR) &&
|
(psDroid->droidType != DROID_REPAIR) &&
|
||||||
(psDroid->droidType != DROID_CYBORG_REPAIR) &&
|
(psDroid->droidType != DROID_CYBORG_REPAIR) &&
|
||||||
(psDroid->droidType != DROID_TRANSPORTER))
|
(psDroid->droidType != DROID_TRANSPORTER) &&
|
||||||
|
(psDroid->droidType != DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
uint32_t numKills = 0;
|
uint32_t numKills = 0;
|
||||||
experienceLoc = 0;
|
experienceLoc = 0;
|
||||||
|
@ -1956,7 +1956,7 @@ DROID *reallyBuildDroid(DROID_TEMPLATE *pTemplate, Position pos, UDWORD player,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* transporter-specific stuff */
|
/* transporter-specific stuff */
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
//add transporter launch button if selected player and not a reinforcable situation
|
//add transporter launch button if selected player and not a reinforcable situation
|
||||||
if ( player == selectedPlayer && !missionCanReEnforce())
|
if ( player == selectedPlayer && !missionCanReEnforce())
|
||||||
|
@ -2943,14 +2943,14 @@ UBYTE checkCommandExist(UBYTE player)
|
||||||
bool isVtolDroid(const DROID* psDroid)
|
bool isVtolDroid(const DROID* psDroid)
|
||||||
{
|
{
|
||||||
return asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT
|
return asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT
|
||||||
&& psDroid->droidType != DROID_TRANSPORTER;
|
&& (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns true if the droid has lift propulsion and is moving */
|
/* returns true if the droid has lift propulsion and is moving */
|
||||||
bool isFlying(const DROID* psDroid)
|
bool isFlying(const DROID* psDroid)
|
||||||
{
|
{
|
||||||
return (asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat)->propulsionType == PROPULSION_TYPE_LIFT
|
return (asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat)->propulsionType == PROPULSION_TYPE_LIFT
|
||||||
&& ( psDroid->sMove.Status != MOVEINACTIVE || psDroid->droidType == DROID_TRANSPORTER );
|
&& (psDroid->sMove.Status != MOVEINACTIVE || psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns true if it's a VTOL weapon droid which has completed all runs */
|
/* returns true if it's a VTOL weapon droid which has completed all runs */
|
||||||
|
@ -3564,7 +3564,7 @@ DROID * giftSingleDroid(DROID *psD, UDWORD to)
|
||||||
psNewDroid->armour[WC_HEAT] = armourH;
|
psNewDroid->armour[WC_HEAT] = armourH;
|
||||||
psNewDroid->experience = numKills;
|
psNewDroid->experience = numKills;
|
||||||
psNewDroid->rot.direction = direction;
|
psNewDroid->rot.direction = direction;
|
||||||
if (!(psNewDroid->droidType == DROID_PERSON || cyborgDroid(psNewDroid) || psNewDroid->droidType == DROID_TRANSPORTER))
|
if (!(psNewDroid->droidType == DROID_PERSON || cyborgDroid(psNewDroid) || (psNewDroid->droidType == DROID_TRANSPORTER || psNewDroid->droidType == DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
updateDroidOrientation(psNewDroid);
|
updateDroidOrientation(psNewDroid);
|
||||||
}
|
}
|
||||||
|
@ -3656,7 +3656,7 @@ bool checkValidWeaponForProp(DROID_TEMPLATE *psTemplate)
|
||||||
void SelectDroid(DROID *psDroid)
|
void SelectDroid(DROID *psDroid)
|
||||||
{
|
{
|
||||||
// we shouldn't ever control the transporter in SP games
|
// we shouldn't ever control the transporter in SP games
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER || bMultiPlayer)
|
if ((psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER) || bMultiPlayer)
|
||||||
{
|
{
|
||||||
psDroid->selected = true;
|
psDroid->selected = true;
|
||||||
intRefreshScreen();
|
intRefreshScreen();
|
||||||
|
@ -3717,7 +3717,7 @@ bool isConstructionDroid(BASE_OBJECT const *psObject)
|
||||||
|
|
||||||
bool droidOnMap(const DROID *psDroid)
|
bool droidOnMap(const DROID *psDroid)
|
||||||
{
|
{
|
||||||
if (psDroid->died == NOT_CURRENT_LIST || psDroid->droidType == DROID_TRANSPORTER
|
if (psDroid->died == NOT_CURRENT_LIST || psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER
|
||||||
|| psDroid->pos.x == INVALID_XY || psDroid->pos.y == INVALID_XY || missionIsOffworld()
|
|| psDroid->pos.x == INVALID_XY || psDroid->pos.y == INVALID_XY || missionIsOffworld()
|
||||||
|| mapHeight == 0)
|
|| mapHeight == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,7 @@ enum DROID_TYPE
|
||||||
DROID_PERSON, ///< person
|
DROID_PERSON, ///< person
|
||||||
DROID_CYBORG, ///< cyborg-type thang
|
DROID_CYBORG, ///< cyborg-type thang
|
||||||
DROID_TRANSPORTER, ///< guess what this is!
|
DROID_TRANSPORTER, ///< guess what this is!
|
||||||
|
DROID_SUPERTRANSPORTER, ///< SuperTransport (MP)
|
||||||
DROID_COMMAND, ///< Command droid
|
DROID_COMMAND, ///< Command droid
|
||||||
DROID_REPAIR, ///< Repair droid
|
DROID_REPAIR, ///< Repair droid
|
||||||
DROID_DEFAULT, ///< Default droid
|
DROID_DEFAULT, ///< Default droid
|
||||||
|
@ -130,7 +131,8 @@ struct DROID : public BASE_OBJECT
|
||||||
DROID(uint32_t id, unsigned player);
|
DROID(uint32_t id, unsigned player);
|
||||||
~DROID();
|
~DROID();
|
||||||
|
|
||||||
/// UTF-8 name of the droid. This is generated from the droid template and cannot be changed by the game player after creation.
|
/// UTF-8 name of the droid. This is generated from the droid template
|
||||||
|
/// WARNING: This *can* be changed by the game player after creation & can be translated, do NOT rely on this being the same for everyone!
|
||||||
char aName[MAX_STR_LENGTH];
|
char aName[MAX_STR_LENGTH];
|
||||||
|
|
||||||
DROID_TYPE droidType; ///< The type of droid
|
DROID_TYPE droidType; ///< The type of droid
|
||||||
|
|
|
@ -529,7 +529,7 @@ static void fpathExecute(PATHJOB *psJob, PATHRESULT *psResult)
|
||||||
case ASR_FAILED:
|
case ASR_FAILED:
|
||||||
objTrace(psJob->droidID, "** Failed route **");
|
objTrace(psJob->droidID, "** Failed route **");
|
||||||
// Is this really a good idea? Was in original code.
|
// Is this really a good idea? Was in original code.
|
||||||
if (psJob->propulsion == PROPULSION_TYPE_LIFT && psJob->droidType != DROID_TRANSPORTER)
|
if (psJob->propulsion == PROPULSION_TYPE_LIFT && (psJob->droidType != DROID_TRANSPORTER && psJob->droidType != DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
objTrace(psJob->droidID, "Doing fallback for non-transport VTOL");
|
objTrace(psJob->droidID, "Doing fallback for non-transport VTOL");
|
||||||
fpathSetMove(&psResult->sMove, psJob->destX, psJob->destY);
|
fpathSetMove(&psResult->sMove, psJob->destX, psJob->destY);
|
||||||
|
|
|
@ -1230,7 +1230,7 @@ void droidBodyUpgrade(FUNCTION *pFunction, DROID *psDroid)
|
||||||
psDroid->originalBody = newBaseBody;
|
psDroid->originalBody = newBaseBody;
|
||||||
}
|
}
|
||||||
//if a transporter droid then need to upgrade the contents
|
//if a transporter droid then need to upgrade the contents
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
for (psCurr = psDroid->psGroup->psList; psCurr != NULL; psCurr =
|
for (psCurr = psDroid->psGroup->psList; psCurr != NULL; psCurr =
|
||||||
psCurr->psGrpNext)
|
psCurr->psGrpNext)
|
||||||
|
@ -1449,14 +1449,11 @@ void wallDefenceUpgrade(FUNCTION *pFunction, UBYTE player)
|
||||||
void upgradeTransporterDroids(DROID *psTransporter,
|
void upgradeTransporterDroids(DROID *psTransporter,
|
||||||
void(*pUpgradeFunction)(DROID *psDroid))
|
void(*pUpgradeFunction)(DROID *psDroid))
|
||||||
{
|
{
|
||||||
DROID *psCurr;
|
// NOTE: may allow DROID_SUPERTRANSPORTER upgrades...
|
||||||
|
ASSERT (psTransporter->droidType == DROID_TRANSPORTER, "upgradeTransporterUnits: invalid unit type");
|
||||||
ASSERT( psTransporter->droidType == DROID_TRANSPORTER,
|
|
||||||
"upgradeTransporterUnits: invalid unit type" );
|
|
||||||
|
|
||||||
//loop thru' each unit in the Transporter
|
//loop thru' each unit in the Transporter
|
||||||
for (psCurr = psTransporter->psGroup->psList; psCurr != NULL; psCurr =
|
for (DROID *psCurr = psTransporter->psGroup->psList; psCurr != NULL; psCurr = psCurr->psGrpNext)
|
||||||
psCurr->psGrpNext)
|
|
||||||
{
|
{
|
||||||
if (psCurr != psTransporter)
|
if (psCurr != psTransporter)
|
||||||
{
|
{
|
||||||
|
|
11
src/game.cpp
11
src/game.cpp
|
@ -2090,7 +2090,7 @@ bool loadGame(const char *pGameToLoad, bool keepObjects, bool freeMem, bool User
|
||||||
if (psCurr->droidType != DROID_PERSON
|
if (psCurr->droidType != DROID_PERSON
|
||||||
// && psCurr->droidType != DROID_CYBORG
|
// && psCurr->droidType != DROID_CYBORG
|
||||||
&& !cyborgDroid(psCurr)
|
&& !cyborgDroid(psCurr)
|
||||||
&& psCurr->droidType != DROID_TRANSPORTER
|
&& (psCurr->droidType != DROID_TRANSPORTER && psCurr->droidType != DROID_SUPERTRANSPORTER)
|
||||||
&& psCurr->pos.x != INVALID_XY)
|
&& psCurr->pos.x != INVALID_XY)
|
||||||
{
|
{
|
||||||
updateDroidOrientation(psCurr);
|
updateDroidOrientation(psCurr);
|
||||||
|
@ -2230,7 +2230,7 @@ bool loadGame(const char *pGameToLoad, bool keepObjects, bool freeMem, bool User
|
||||||
{
|
{
|
||||||
if (psCurr->droidType != DROID_PERSON
|
if (psCurr->droidType != DROID_PERSON
|
||||||
&& !cyborgDroid(psCurr)
|
&& !cyborgDroid(psCurr)
|
||||||
&& psCurr->droidType != DROID_TRANSPORTER
|
&& (psCurr->droidType != DROID_TRANSPORTER && psCurr->droidType != DROID_SUPERTRANSPORTER)
|
||||||
&& psCurr->pos.x != INVALID_XY)
|
&& psCurr->pos.x != INVALID_XY)
|
||||||
{
|
{
|
||||||
updateDroidOrientation(psCurr);
|
updateDroidOrientation(psCurr);
|
||||||
|
@ -4042,7 +4042,7 @@ static bool loadSaveDroidPointers(const QString &pFileName, DROID **ppsCurrentDr
|
||||||
|
|
||||||
for (psDroid = ppsCurrentDroidLists[player]; psDroid && psDroid->id != id; psDroid = psDroid->psNext)
|
for (psDroid = ppsCurrentDroidLists[player]; psDroid && psDroid->id != id; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER && psDroid->psGroup != NULL) // Check for droids in the transporter.
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && psDroid->psGroup != NULL) // Check for droids in the transporter.
|
||||||
{
|
{
|
||||||
for (DROID *psTrDroid = psDroid->psGroup->psList; psTrDroid != NULL; psTrDroid = psTrDroid->psGrpNext)
|
for (DROID *psTrDroid = psDroid->psGroup->psList; psTrDroid != NULL; psTrDroid = psTrDroid->psGrpNext)
|
||||||
{
|
{
|
||||||
|
@ -4143,6 +4143,7 @@ static bool loadSaveDroid(const char *pFileName, DROID **ppsCurrentDroidLists)
|
||||||
switch (droidType)
|
switch (droidType)
|
||||||
{
|
{
|
||||||
case DROID_TRANSPORTER: ++priority;
|
case DROID_TRANSPORTER: ++priority;
|
||||||
|
case DROID_SUPERTRANSPORTER: ++priority;
|
||||||
case DROID_COMMAND: ++priority;
|
case DROID_COMMAND: ++priority;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
@ -4320,7 +4321,7 @@ static bool loadSaveDroid(const char *pFileName, DROID **ppsCurrentDroidLists)
|
||||||
scriptSetStartPos(psDroid->player, psDroid->pos.x, psDroid->pos.y); // set map start position, FIXME - save properly elsewhere!
|
scriptSetStartPos(psDroid->player, psDroid->pos.x, psDroid->pos.y); // set map start position, FIXME - save properly elsewhere!
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psDroid->psGroup == NULL || psDroid->psGroup->type != GT_TRANSPORTER || psDroid->droidType == DROID_TRANSPORTER) // do not add to list if on a transport, then the group list is used instead
|
if (psDroid->psGroup == NULL || psDroid->psGroup->type != GT_TRANSPORTER || psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) // do not add to list if on a transport, then the group list is used instead
|
||||||
{
|
{
|
||||||
addDroid(psDroid, ppsCurrentDroidLists);
|
addDroid(psDroid, ppsCurrentDroidLists);
|
||||||
}
|
}
|
||||||
|
@ -4457,7 +4458,7 @@ static bool writeDroidFile(const char *pFileName, DROID **ppsCurrentDroidLists)
|
||||||
for (DROID *psCurr = ppsCurrentDroidLists[player]; psCurr != NULL; psCurr = psCurr->psNext)
|
for (DROID *psCurr = ppsCurrentDroidLists[player]; psCurr != NULL; psCurr = psCurr->psNext)
|
||||||
{
|
{
|
||||||
writeDroid(ini, psCurr, onMission, counter);
|
writeDroid(ini, psCurr, onMission, counter);
|
||||||
if (psCurr->droidType == DROID_TRANSPORTER) // if transporter save any droids in the grp
|
if (psCurr->droidType == DROID_TRANSPORTER || psCurr->droidType == DROID_SUPERTRANSPORTER) // if transporter save any droids in the grp
|
||||||
{
|
{
|
||||||
for (DROID *psTrans = psCurr->psGroup->psList; psTrans != NULL; psTrans = psTrans->psGrpNext)
|
for (DROID *psTrans = psCurr->psGroup->psList; psTrans != NULL; psTrans = psTrans->psGrpNext)
|
||||||
{
|
{
|
||||||
|
|
|
@ -118,7 +118,7 @@ void DROID_GROUP::add(DROID *psDroid)
|
||||||
}
|
}
|
||||||
psDroid->psGroup = this;
|
psDroid->psGroup = this;
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
ASSERT_OR_RETURN(, (type == GT_NORMAL), "grpJoin: Cannot have two transporters in a group" );
|
ASSERT_OR_RETURN(, (type == GT_NORMAL), "grpJoin: Cannot have two transporters in a group" );
|
||||||
ASSERT_OR_RETURN(, psList == NULL, "Adding transporter to non-empty list.");
|
ASSERT_OR_RETURN(, psList == NULL, "Adding transporter to non-empty list.");
|
||||||
|
@ -203,7 +203,7 @@ void DROID_GROUP::remove(DROID *psDroid)
|
||||||
type = GT_NORMAL;
|
type = GT_NORMAL;
|
||||||
psCommander = NULL;
|
psCommander = NULL;
|
||||||
}
|
}
|
||||||
else if ((psDroid->droidType == DROID_TRANSPORTER) && (type == GT_TRANSPORTER))
|
else if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && (type == GT_TRANSPORTER))
|
||||||
{
|
{
|
||||||
type = GT_NORMAL;
|
type = GT_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
35
src/hci.cpp
35
src/hci.cpp
|
@ -6313,28 +6313,34 @@ DROID *intGotoNextDroidType(DROID *CurrDroid,UDWORD droidType,bool AllowGroup)
|
||||||
DROID *psDroid;
|
DROID *psDroid;
|
||||||
bool Found = false;
|
bool Found = false;
|
||||||
|
|
||||||
if(CurrDroid != NULL) {
|
if(CurrDroid != NULL)
|
||||||
|
{
|
||||||
CurrentDroid = CurrDroid;
|
CurrentDroid = CurrDroid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ((SWORD)droidType != CurrentDroidType) && (droidType != DROID_ANY)) {
|
if( ((SWORD)droidType != CurrentDroidType) && (droidType != DROID_ANY))
|
||||||
|
{
|
||||||
CurrentDroid = NULL;
|
CurrentDroid = NULL;
|
||||||
CurrentDroidType = (SWORD)droidType;
|
CurrentDroidType = (SWORD)droidType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CurrentDroid != NULL) {
|
if(CurrentDroid != NULL)
|
||||||
|
{
|
||||||
psDroid = CurrentDroid;
|
psDroid = CurrentDroid;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
psDroid = apsDroidLists[selectedPlayer];
|
psDroid = apsDroidLists[selectedPlayer];
|
||||||
}
|
}
|
||||||
|
|
||||||
for(; psDroid != NULL; psDroid = psDroid->psNext)
|
for(; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if( ( ((UDWORD)psDroid->droidType == droidType) ||
|
if ((((UDWORD)psDroid->droidType == droidType) ||
|
||||||
((droidType == DROID_ANY) && (psDroid->droidType != DROID_TRANSPORTER)) ) &&
|
((droidType == DROID_ANY) && (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)) ) &&
|
||||||
((psDroid->group == UBYTE_MAX) || AllowGroup) )
|
((psDroid->group == UBYTE_MAX) || AllowGroup))
|
||||||
{
|
{
|
||||||
if(psDroid != CurrentDroid) {
|
if(psDroid != CurrentDroid)
|
||||||
|
{
|
||||||
clearSel();
|
clearSel();
|
||||||
SelectDroid(psDroid);
|
SelectDroid(psDroid);
|
||||||
CurrentDroid = psDroid;
|
CurrentDroid = psDroid;
|
||||||
|
@ -6345,14 +6351,16 @@ DROID *intGotoNextDroidType(DROID *CurrDroid,UDWORD droidType,bool AllowGroup)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start back at the begining?
|
// Start back at the begining?
|
||||||
if((!Found) && (CurrentDroid != NULL)) {
|
if((!Found) && (CurrentDroid != NULL))
|
||||||
|
{
|
||||||
for(psDroid = apsDroidLists[selectedPlayer]; (psDroid != CurrentDroid) && (psDroid != NULL); psDroid = psDroid->psNext)
|
for(psDroid = apsDroidLists[selectedPlayer]; (psDroid != CurrentDroid) && (psDroid != NULL); psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if( ( ((UDWORD)psDroid->droidType == droidType) ||
|
if( ( ((UDWORD)psDroid->droidType == droidType) ||
|
||||||
((droidType == DROID_ANY) && (psDroid->droidType != DROID_TRANSPORTER)) ) &&
|
((droidType == DROID_ANY) && (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)) ) &&
|
||||||
((psDroid->group == UBYTE_MAX) || AllowGroup) )
|
((psDroid->group == UBYTE_MAX) || AllowGroup) )
|
||||||
{
|
{
|
||||||
if(psDroid != CurrentDroid) {
|
if(psDroid != CurrentDroid)
|
||||||
|
{
|
||||||
clearSel();
|
clearSel();
|
||||||
SelectDroid(psDroid);
|
SelectDroid(psDroid);
|
||||||
CurrentDroid = psDroid;
|
CurrentDroid = psDroid;
|
||||||
|
@ -6370,13 +6378,12 @@ DROID *intGotoNextDroidType(DROID *CurrDroid,UDWORD droidType,bool AllowGroup)
|
||||||
psCBSelectedDroid = NULL;
|
psCBSelectedDroid = NULL;
|
||||||
|
|
||||||
// Center it on screen.
|
// Center it on screen.
|
||||||
if(CurrentDroid) {
|
if(CurrentDroid)
|
||||||
|
{
|
||||||
intSetMapPos(CurrentDroid->pos.x, CurrentDroid->pos.y);
|
intSetMapPos(CurrentDroid->pos.x, CurrentDroid->pos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CurrentDroid;
|
return CurrentDroid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2150,14 +2150,17 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
UDWORD basePlateSize;
|
UDWORD basePlateSize;
|
||||||
SDWORD scale;
|
SDWORD scale;
|
||||||
|
|
||||||
if(Down) {
|
if(Down)
|
||||||
|
{
|
||||||
ox = oy = 2;
|
ox = oy = 2;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ox = oy = 0;
|
ox = oy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((IMDType == IMDTYPE_DROID) || (IMDType == IMDTYPE_DROIDTEMPLATE)) { // The case where we have to render a composite droid.
|
if ((IMDType == IMDTYPE_DROID) || (IMDType == IMDTYPE_DROIDTEMPLATE))
|
||||||
|
{ // The case where we have to render a composite droid.
|
||||||
if(Down)
|
if(Down)
|
||||||
{
|
{
|
||||||
//the top button is smaller than the bottom button
|
//the top button is smaller than the bottom button
|
||||||
|
@ -2191,7 +2194,7 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IMDType == IMDTYPE_DROID)
|
if (IMDType == IMDTYPE_DROID)
|
||||||
{
|
{
|
||||||
Radius = getComponentDroidRadius((DROID*)Object);
|
Radius = getComponentDroidRadius((DROID*)Object);
|
||||||
}
|
}
|
||||||
|
@ -2216,12 +2219,12 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
|
|
||||||
if(IMDType == IMDTYPE_DROID)
|
if(IMDType == IMDTYPE_DROID)
|
||||||
{
|
{
|
||||||
if(((DROID*)Object)->droidType == DROID_TRANSPORTER)
|
if (((DROID*)Object)->droidType == DROID_TRANSPORTER || ((DROID*)Object)->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
Position.x = 0;
|
Position.x = 0;
|
||||||
Position.y = 0;//BUT_TRANSPORTER_ALT;
|
Position.y = 0;//BUT_TRANSPORTER_ALT;
|
||||||
Position.z = BUTTON_DEPTH;
|
Position.z = BUTTON_DEPTH;
|
||||||
if ((!strcmp("Cyborg Transport",((DROID*)Object)->aName)))
|
if (((DROID*)Object)->droidType == DROID_TRANSPORTER)
|
||||||
{
|
{
|
||||||
scale = DROID_BUT_SCALE/2;
|
scale = DROID_BUT_SCALE/2;
|
||||||
}
|
}
|
||||||
|
@ -2238,12 +2241,12 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
}
|
}
|
||||||
else//(IMDType == IMDTYPE_DROIDTEMPLATE)
|
else//(IMDType == IMDTYPE_DROIDTEMPLATE)
|
||||||
{
|
{
|
||||||
if(((DROID_TEMPLATE*)Object)->droidType == DROID_TRANSPORTER)
|
if (((DROID_TEMPLATE*)Object)->droidType == DROID_TRANSPORTER || ((DROID_TEMPLATE*)Object)->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
Position.x = 0;
|
Position.x = 0;
|
||||||
Position.y = 0;//BUT_TRANSPORTER_ALT;
|
Position.y = 0;//BUT_TRANSPORTER_ALT;
|
||||||
Position.z = BUTTON_DEPTH;
|
Position.z = BUTTON_DEPTH;
|
||||||
if ((!strcmp("Cyborg Transport",((DROID_TEMPLATE*)Object)->aName)))
|
if (((DROID_TEMPLATE*)Object)->droidType == DROID_TRANSPORTER)
|
||||||
{
|
{
|
||||||
scale = DROID_BUT_SCALE/2;
|
scale = DROID_BUT_SCALE/2;
|
||||||
}
|
}
|
||||||
|
@ -2260,14 +2263,12 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
}
|
}
|
||||||
|
|
||||||
//lefthand display droid buttons
|
//lefthand display droid buttons
|
||||||
if(IMDType == IMDTYPE_DROID)
|
if (IMDType == IMDTYPE_DROID)
|
||||||
{
|
{
|
||||||
displayComponentButtonObject((DROID*)Object,&Rotation,&Position,true, scale);
|
displayComponentButtonObject((DROID*)Object,&Rotation,&Position,true, scale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
displayComponentButtonTemplate((DROID_TEMPLATE*)Object,&Rotation,&Position,true, scale);
|
displayComponentButtonTemplate((DROID_TEMPLATE*)Object,&Rotation,&Position,true, scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2315,7 +2316,7 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
//ASSERT( Radius <= OBJECT_RADIUS,"Object too big for button - %s",
|
//ASSERT( Radius <= OBJECT_RADIUS,"Object too big for button - %s",
|
||||||
// ((BASE_STATS*)Object)->pName );
|
// ((BASE_STATS*)Object)->pName );
|
||||||
// NOTE: The Super transport is huge, and is considered a component type, so refit it to inside the button.
|
// NOTE: The Super transport is huge, and is considered a component type, so refit it to inside the button.
|
||||||
if ((!strcmp("SuperTransportBody",((BASE_STATS*)Object)->pName)))
|
if (((DROID*)Object)->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
scale /= 2;
|
scale /= 2;
|
||||||
}
|
}
|
||||||
|
@ -2323,18 +2324,18 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
else if(IMDType == IMDTYPE_RESEARCH)
|
else if(IMDType == IMDTYPE_RESEARCH)
|
||||||
{
|
{
|
||||||
Radius = getResearchRadius((BASE_STATS*)Object);
|
Radius = getResearchRadius((BASE_STATS*)Object);
|
||||||
if(Radius <= 100)
|
if (Radius <= 100)
|
||||||
{
|
{
|
||||||
Size = 2;//small structure
|
Size = 2;//small structure
|
||||||
scale = rescaleButtonObject(Radius, COMP_BUT_SCALE, COMPONENT_RADIUS);
|
scale = rescaleButtonObject(Radius, COMP_BUT_SCALE, COMPONENT_RADIUS);
|
||||||
//scale = COMP_BUT_SCALE;
|
//scale = COMP_BUT_SCALE;
|
||||||
}
|
}
|
||||||
else if(Radius <= 128)
|
else if (Radius <= 128)
|
||||||
{
|
{
|
||||||
Size = 2;//small structure
|
Size = 2;//small structure
|
||||||
scale = SMALL_STRUCT_SCALE;
|
scale = SMALL_STRUCT_SCALE;
|
||||||
}
|
}
|
||||||
else if(Radius <= 256)
|
else if (Radius <= 256)
|
||||||
{
|
{
|
||||||
Size = 1;//med structure
|
Size = 1;//med structure
|
||||||
scale = MED_STRUCT_SCALE;
|
scale = MED_STRUCT_SCALE;
|
||||||
|
@ -2345,15 +2346,15 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
scale = LARGE_STRUCT_SCALE;
|
scale = LARGE_STRUCT_SCALE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(IMDType == IMDTYPE_STRUCTURE)
|
else if (IMDType == IMDTYPE_STRUCTURE)
|
||||||
{
|
{
|
||||||
basePlateSize = getStructureSizeMax((STRUCTURE*)Object);
|
basePlateSize = getStructureSizeMax((STRUCTURE*)Object);
|
||||||
if(basePlateSize == 1)
|
if (basePlateSize == 1)
|
||||||
{
|
{
|
||||||
Size = 2;//small structure
|
Size = 2;//small structure
|
||||||
scale = SMALL_STRUCT_SCALE;
|
scale = SMALL_STRUCT_SCALE;
|
||||||
}
|
}
|
||||||
else if(basePlateSize == 2)
|
else if (basePlateSize == 2)
|
||||||
{
|
{
|
||||||
Size = 1;//med structure
|
Size = 1;//med structure
|
||||||
scale = MED_STRUCT_SCALE;
|
scale = MED_STRUCT_SCALE;
|
||||||
|
@ -2364,15 +2365,15 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
scale = LARGE_STRUCT_SCALE;
|
scale = LARGE_STRUCT_SCALE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(IMDType == IMDTYPE_STRUCTURESTAT)
|
else if (IMDType == IMDTYPE_STRUCTURESTAT)
|
||||||
{
|
{
|
||||||
basePlateSize = getStructureStatSizeMax((STRUCTURE_STATS*)Object);
|
basePlateSize = getStructureStatSizeMax((STRUCTURE_STATS*)Object);
|
||||||
if(basePlateSize == 1)
|
if (basePlateSize == 1)
|
||||||
{
|
{
|
||||||
Size = 2;//small structure
|
Size = 2;//small structure
|
||||||
scale = SMALL_STRUCT_SCALE;
|
scale = SMALL_STRUCT_SCALE;
|
||||||
}
|
}
|
||||||
else if(basePlateSize == 2)
|
else if (basePlateSize == 2)
|
||||||
{
|
{
|
||||||
Size = 1;//med structure
|
Size = 1;//med structure
|
||||||
scale = MED_STRUCT_SCALE;
|
scale = MED_STRUCT_SCALE;
|
||||||
|
@ -2388,20 +2389,23 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
|
|
||||||
Radius = ((iIMDShape*)Object)->sradius;
|
Radius = ((iIMDShape*)Object)->sradius;
|
||||||
|
|
||||||
if(Radius <= 128) {
|
if (Radius <= 128)
|
||||||
|
{
|
||||||
Size = 2;//small structure
|
Size = 2;//small structure
|
||||||
scale = SMALL_STRUCT_SCALE;
|
scale = SMALL_STRUCT_SCALE;
|
||||||
} else if(Radius <= 256) {
|
}
|
||||||
|
else if (Radius <= 256)
|
||||||
|
{
|
||||||
Size = 1;//med structure
|
Size = 1;//med structure
|
||||||
scale = MED_STRUCT_SCALE;
|
scale = MED_STRUCT_SCALE;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Size = 0;
|
Size = 0;
|
||||||
scale = LARGE_STRUCT_SCALE;
|
scale = LARGE_STRUCT_SCALE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ClearButton(Down,Size, buttonType);
|
ClearButton(Down,Size, buttonType);
|
||||||
|
|
||||||
Rotation.x = -30;
|
Rotation.x = -30;
|
||||||
|
@ -2424,15 +2428,24 @@ void CreateIMDButton(IMAGEFILE *ImageFile, UWORD ImageID, void *Object, UDWORD P
|
||||||
pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON);
|
pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON);
|
||||||
|
|
||||||
/* all non droid buttons */
|
/* all non droid buttons */
|
||||||
if(IMDType == IMDTYPE_COMPONENT) {
|
if (IMDType == IMDTYPE_COMPONENT)
|
||||||
|
{
|
||||||
displayComponentButton((BASE_STATS*)Object,&Rotation,&Position,true, scale);
|
displayComponentButton((BASE_STATS*)Object,&Rotation,&Position,true, scale);
|
||||||
} else if(IMDType == IMDTYPE_RESEARCH) {
|
}
|
||||||
|
else if (IMDType == IMDTYPE_RESEARCH)
|
||||||
|
{
|
||||||
displayResearchButton((BASE_STATS*)Object,&Rotation,&Position,true, scale);
|
displayResearchButton((BASE_STATS*)Object,&Rotation,&Position,true, scale);
|
||||||
} else if(IMDType == IMDTYPE_STRUCTURE) {
|
}
|
||||||
|
else if (IMDType == IMDTYPE_STRUCTURE)
|
||||||
|
{
|
||||||
displayStructureButton((STRUCTURE*)Object,&Rotation,&Position,true, scale);
|
displayStructureButton((STRUCTURE*)Object,&Rotation,&Position,true, scale);
|
||||||
} else if(IMDType == IMDTYPE_STRUCTURESTAT) {
|
}
|
||||||
|
else if (IMDType == IMDTYPE_STRUCTURESTAT)
|
||||||
|
{
|
||||||
displayStructureStatButton((STRUCTURE_STATS*)Object, &Rotation, &Position, true, scale);
|
displayStructureStatButton((STRUCTURE_STATS*)Object, &Rotation, &Position, true, scale);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
displayIMDButton((iIMDShape*)Object,&Rotation,&Position,true, scale);
|
displayIMDButton((iIMDShape*)Object,&Rotation,&Position,true, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1005,8 +1005,10 @@ static bool SetSecondaryState(SECONDARY_ORDER sec, unsigned State)
|
||||||
if (SelectedDroids[i])
|
if (SelectedDroids[i])
|
||||||
{
|
{
|
||||||
//Only set the state if it's not a transporter.
|
//Only set the state if it's not a transporter.
|
||||||
if(SelectedDroids[i]->droidType != DROID_TRANSPORTER) {
|
if (SelectedDroids[i]->droidType != DROID_TRANSPORTER && SelectedDroids[i]->droidType != DROID_SUPERTRANSPORTER)
|
||||||
if(!secondarySetState(SelectedDroids[i], sec, (SECONDARY_STATE)State)) {
|
{
|
||||||
|
if (!secondarySetState(SelectedDroids[i], sec, (SECONDARY_STATE)State))
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,7 +349,7 @@ void kf_CloneSelected( void )
|
||||||
}
|
}
|
||||||
psNewDroid->experience = psDroid->experience;
|
psNewDroid->experience = psDroid->experience;
|
||||||
psNewDroid->rot.direction = psDroid->rot.direction;
|
psNewDroid->rot.direction = psDroid->rot.direction;
|
||||||
if (!(psNewDroid->droidType == DROID_PERSON || cyborgDroid(psNewDroid) || psNewDroid->droidType == DROID_TRANSPORTER))
|
if (!(psNewDroid->droidType == DROID_PERSON || cyborgDroid(psNewDroid) || psNewDroid->droidType == DROID_TRANSPORTER || psNewDroid->droidType == DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
updateDroidOrientation(psNewDroid);
|
updateDroidOrientation(psNewDroid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -509,6 +509,7 @@ static void gameStateUpdate()
|
||||||
numConstructorDroids[i] += 1;
|
numConstructorDroids[i] += 1;
|
||||||
break;
|
break;
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
if( (psCurr->psGroup != NULL) )
|
if( (psCurr->psGroup != NULL) )
|
||||||
{
|
{
|
||||||
DROID *psDroid = NULL;
|
DROID *psDroid = NULL;
|
||||||
|
@ -551,6 +552,7 @@ static void gameStateUpdate()
|
||||||
numConstructorDroids[i] += 1;
|
numConstructorDroids[i] += 1;
|
||||||
break;
|
break;
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
if( (psCurr->psGroup != NULL) )
|
if( (psCurr->psGroup != NULL) )
|
||||||
{
|
{
|
||||||
numTransporterDroids[i] += psCurr->psGroup->refCount-1;
|
numTransporterDroids[i] += psCurr->psGroup->refCount-1;
|
||||||
|
|
|
@ -110,6 +110,7 @@ void renderResearchToBuffer(RESEARCH *psResearch, UDWORD OriginX, UDWORD OriginY
|
||||||
IMDType = IMDTYPE_COMPONENT;
|
IMDType = IMDTYPE_COMPONENT;
|
||||||
psResGraphic = psResearch->psStat;
|
psResGraphic = psResearch->psStat;
|
||||||
// NOTE: Another kludge to deal with the superTransport to make it "fit" the display.
|
// NOTE: Another kludge to deal with the superTransport to make it "fit" the display.
|
||||||
|
// Using pName, should be safe to compare, pName doesn't get translated.
|
||||||
if (!strcmp("SuperTransport", psResearch->pName))
|
if (!strcmp("SuperTransport", psResearch->pName))
|
||||||
{
|
{
|
||||||
scale = RESEARCH_COMPONENT_SCALE / 3;
|
scale = RESEARCH_COMPONENT_SCALE / 3;
|
||||||
|
|
130
src/mission.cpp
130
src/mission.cpp
|
@ -578,10 +578,9 @@ void addTransporterTimerInterface(void)
|
||||||
if (mission.ETA >= 0)
|
if (mission.ETA >= 0)
|
||||||
{
|
{
|
||||||
//check the player has at least one Transporter back at base
|
//check the player has at least one Transporter back at base
|
||||||
for (DROID *psDroid = mission.apsDroidLists[selectedPlayer]; psDroid !=
|
for (DROID *psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
NULL; psDroid = psDroid->psNext)
|
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
psTransporter = psDroid;
|
psTransporter = psDroid;
|
||||||
break;
|
break;
|
||||||
|
@ -1004,37 +1003,37 @@ void placeLimboDroids(void)
|
||||||
for (psDroid = apsLimboDroids[selectedPlayer]; psDroid != NULL; psDroid = psNext)
|
for (psDroid = apsLimboDroids[selectedPlayer]; psDroid != NULL; psDroid = psNext)
|
||||||
{
|
{
|
||||||
psNext = psDroid->psNext;
|
psNext = psDroid->psNext;
|
||||||
if (droidRemove(psDroid, apsLimboDroids))
|
if (droidRemove(psDroid, apsLimboDroids))
|
||||||
{
|
{
|
||||||
addDroid(psDroid, apsDroidLists);
|
addDroid(psDroid, apsDroidLists);
|
||||||
//KILL OFF TRANSPORTER - should never be one but....
|
//KILL OFF TRANSPORTER - should never be one but....
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
vanishDroid(psDroid);
|
vanishDroid(psDroid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//set up location for each of the droids
|
//set up location for each of the droids
|
||||||
droidX = map_coord(getLandingX(LIMBO_LANDING));
|
droidX = map_coord(getLandingX(LIMBO_LANDING));
|
||||||
droidY = map_coord(getLandingY(LIMBO_LANDING));
|
droidY = map_coord(getLandingY(LIMBO_LANDING));
|
||||||
pickRes = pickHalfATile(&droidX, &droidY,LOOK_FOR_EMPTY_TILE);
|
pickRes = pickHalfATile(&droidX, &droidY,LOOK_FOR_EMPTY_TILE);
|
||||||
if (pickRes == NO_FREE_TILE )
|
if (pickRes == NO_FREE_TILE )
|
||||||
{
|
{
|
||||||
ASSERT( false, "placeLimboUnits: Unable to find a free location" );
|
ASSERT( false, "placeLimboUnits: Unable to find a free location" );
|
||||||
}
|
}
|
||||||
psDroid->pos.x = (UWORD)world_coord(droidX);
|
psDroid->pos.x = (UWORD)world_coord(droidX);
|
||||||
psDroid->pos.y = (UWORD)world_coord(droidY);
|
psDroid->pos.y = (UWORD)world_coord(droidY);
|
||||||
ASSERT(worldOnMap(psDroid->pos.x,psDroid->pos.y), "limbo droid is not on the map");
|
ASSERT(worldOnMap(psDroid->pos.x,psDroid->pos.y), "limbo droid is not on the map");
|
||||||
psDroid->pos.z = map_Height(psDroid->pos.x, psDroid->pos.y);
|
psDroid->pos.z = map_Height(psDroid->pos.x, psDroid->pos.y);
|
||||||
updateDroidOrientation(psDroid);
|
updateDroidOrientation(psDroid);
|
||||||
psDroid->selected = false;
|
psDroid->selected = false;
|
||||||
//this is mainly for VTOLs
|
//this is mainly for VTOLs
|
||||||
setDroidBase(psDroid, NULL);
|
setDroidBase(psDroid, NULL);
|
||||||
psDroid->cluster = 0;
|
psDroid->cluster = 0;
|
||||||
//initialise the movement data
|
//initialise the movement data
|
||||||
initDroidMovement(psDroid);
|
initDroidMovement(psDroid);
|
||||||
//make sure the died flag is not set
|
//make sure the died flag is not set
|
||||||
psDroid->died = false;
|
psDroid->died = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ASSERT( false, "placeLimboUnits: Unable to remove unit from Limbo list" );
|
ASSERT( false, "placeLimboUnits: Unable to remove unit from Limbo list" );
|
||||||
|
@ -1086,7 +1085,7 @@ void saveCampaignData(void)
|
||||||
while(psDroid != NULL)
|
while(psDroid != NULL)
|
||||||
{
|
{
|
||||||
psNext = psDroid->psNext;
|
psNext = psDroid->psNext;
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
// Empty the transporter into the mission list
|
// Empty the transporter into the mission list
|
||||||
ASSERT(psDroid->psGroup != NULL, "saveCampaignData: Transporter does not have a group");
|
ASSERT(psDroid->psGroup != NULL, "saveCampaignData: Transporter does not have a group");
|
||||||
|
@ -1140,7 +1139,7 @@ void saveCampaignData(void)
|
||||||
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL;
|
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL;
|
||||||
psDroid = psDroid->psNext)
|
psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
//fill it with droids from the mission list
|
//fill it with droids from the mission list
|
||||||
for (psSafeDroid = mission.apsDroidLists[selectedPlayer]; psSafeDroid !=
|
for (psSafeDroid = mission.apsDroidLists[selectedPlayer]; psSafeDroid !=
|
||||||
|
@ -1402,7 +1401,7 @@ void processMissionLimbo(void)
|
||||||
{
|
{
|
||||||
psNext = psDroid->psNext;
|
psNext = psDroid->psNext;
|
||||||
//KILL OFF TRANSPORTER - should never be one but....
|
//KILL OFF TRANSPORTER - should never be one but....
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
vanishDroid(psDroid);
|
vanishDroid(psDroid);
|
||||||
}
|
}
|
||||||
|
@ -1632,23 +1631,22 @@ void resetLimboMission(void)
|
||||||
Only interested in Transporters at present*/
|
Only interested in Transporters at present*/
|
||||||
void missionDroidUpdate(DROID *psDroid)
|
void missionDroidUpdate(DROID *psDroid)
|
||||||
{
|
{
|
||||||
ASSERT( psDroid != NULL,
|
ASSERT (psDroid != NULL, "unitUpdate: Invalid unit pointer");
|
||||||
"unitUpdate: Invalid unit pointer" );
|
|
||||||
|
|
||||||
/*This is required for Transporters that are moved offWorld so the
|
/*This is required for Transporters that are moved offWorld so the
|
||||||
saveGame doesn't try to set their position in the map - especially important
|
saveGame doesn't try to set their position in the map - especially important
|
||||||
for endCam2 where there isn't a valid map!*/
|
for endCam2 where there isn't a valid map!*/
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
psDroid->pos.x = INVALID_XY;
|
psDroid->pos.x = INVALID_XY;
|
||||||
psDroid->pos.y = INVALID_XY;
|
psDroid->pos.y = INVALID_XY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ignore all droids except Transporters
|
//ignore all droids except Transporters
|
||||||
if ( (psDroid->droidType != DROID_TRANSPORTER) ||
|
if ((psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
|
||||||
!(orderState(psDroid, DORDER_TRANSPORTOUT) ||
|
|| !(orderState(psDroid, DORDER_TRANSPORTOUT) ||
|
||||||
orderState(psDroid, DORDER_TRANSPORTIN) ||
|
orderState(psDroid, DORDER_TRANSPORTIN) ||
|
||||||
orderState(psDroid, DORDER_TRANSPORTRETURN)) )
|
orderState(psDroid, DORDER_TRANSPORTRETURN)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1687,7 +1685,7 @@ static void missionResetDroids(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//KILL OFF TRANSPORTER
|
//KILL OFF TRANSPORTER
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
vanishDroid(psDroid);
|
vanishDroid(psDroid);
|
||||||
}
|
}
|
||||||
|
@ -1819,21 +1817,20 @@ void unloadTransporter(DROID *psTransporter, UDWORD x, UDWORD y, bool goingHome)
|
||||||
}
|
}
|
||||||
|
|
||||||
//unload all the droids from within the current Transporter
|
//unload all the droids from within the current Transporter
|
||||||
if (psTransporter->droidType == DROID_TRANSPORTER)
|
if (psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
// If the scripts asked for transporter tracking then clear the "tracking a transporter" flag
|
// If the scripts asked for transporter tracking then clear the "tracking a transporter" flag
|
||||||
// since the transporters landed and unloaded now.
|
// since the transporters landed and unloaded now.
|
||||||
if(psTransporter->player == selectedPlayer) {
|
if (psTransporter->player == selectedPlayer)
|
||||||
|
{
|
||||||
bTrackingTransporter = false;
|
bTrackingTransporter = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset the transporter cluster
|
// reset the transporter cluster
|
||||||
psTransporter->cluster = 0;
|
psTransporter->cluster = 0;
|
||||||
for (psDroid = psTransporter->psGroup->psList; psDroid != NULL
|
for (psDroid = psTransporter->psGroup->psList; psDroid != NULL && psDroid != psTransporter; psDroid = psNext)
|
||||||
&& psDroid != psTransporter; psDroid = psNext)
|
|
||||||
{
|
{
|
||||||
psNext = psDroid->psGrpNext;
|
psNext = psDroid->psGrpNext;
|
||||||
|
|
||||||
//add it back into current droid lists
|
//add it back into current droid lists
|
||||||
addDroid(psDroid, ppCurrentList);
|
addDroid(psDroid, ppCurrentList);
|
||||||
|
|
||||||
|
@ -1845,7 +1842,7 @@ void unloadTransporter(DROID *psTransporter, UDWORD x, UDWORD y, bool goingHome)
|
||||||
//swap the droid and map pointers
|
//swap the droid and map pointers
|
||||||
swapMissionPointers();
|
swapMissionPointers();
|
||||||
}
|
}
|
||||||
if (!pickATileGen(&droidX, &droidY,LOOK_FOR_EMPTY_TILE,zonedPAT))
|
if (!pickATileGen(&droidX, &droidY, LOOK_FOR_EMPTY_TILE, zonedPAT))
|
||||||
{
|
{
|
||||||
ASSERT( false, "unloadTransporter: Unable to find a valid location" );
|
ASSERT( false, "unloadTransporter: Unable to find a valid location" );
|
||||||
}
|
}
|
||||||
|
@ -1950,10 +1947,9 @@ void missionMoveTransporterOffWorld( DROID *psTransporter )
|
||||||
if (psTransporter->player == selectedPlayer)
|
if (psTransporter->player == selectedPlayer)
|
||||||
{
|
{
|
||||||
psDroid = NULL;
|
psDroid = NULL;
|
||||||
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid !=
|
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
NULL; psDroid = psDroid->psNext)
|
|
||||||
{
|
{
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER)
|
if (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3167,11 +3163,10 @@ bool getPlayCountDown(void)
|
||||||
//checks to see if the player has any droids (except Transporters left)
|
//checks to see if the player has any droids (except Transporters left)
|
||||||
bool missionDroidsRemaining(UDWORD player)
|
bool missionDroidsRemaining(UDWORD player)
|
||||||
{
|
{
|
||||||
DROID *psDroid;
|
|
||||||
bool bDroidsRemaining = false;
|
bool bDroidsRemaining = false;
|
||||||
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (DROID *psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER)
|
if (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
bDroidsRemaining = true;
|
bDroidsRemaining = true;
|
||||||
//don't bother looking for more
|
//don't bother looking for more
|
||||||
|
@ -3189,12 +3184,10 @@ void moveDroidsToSafety(DROID *psTransporter)
|
||||||
{
|
{
|
||||||
DROID *psDroid, *psNext;
|
DROID *psDroid, *psNext;
|
||||||
|
|
||||||
ASSERT( psTransporter->droidType == DROID_TRANSPORTER,
|
ASSERT ((psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER), "unit not a Transporter");
|
||||||
"moveUnitsToSafety: unit not a Transporter" );
|
|
||||||
|
|
||||||
//move droids out of Transporter into mission list
|
//move droids out of Transporter into mission list
|
||||||
for (psDroid = psTransporter->psGroup->psList; psDroid != NULL
|
for (psDroid = psTransporter->psGroup->psList; psDroid != NULL && psDroid != psTransporter; psDroid = psNext)
|
||||||
&& psDroid != psTransporter; psDroid = psNext)
|
|
||||||
{
|
{
|
||||||
psNext = psDroid->psGrpNext;
|
psNext = psDroid->psGrpNext;
|
||||||
psTransporter->psGroup->remove(psDroid);
|
psTransporter->psGroup->remove(psDroid);
|
||||||
|
@ -3247,10 +3240,9 @@ void resetMissionWidgets(void)
|
||||||
//check not a typical reinforcement mission
|
//check not a typical reinforcement mission
|
||||||
else if (!missionForReInforcements())
|
else if (!missionForReInforcements())
|
||||||
{
|
{
|
||||||
for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid =
|
for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
psDroid->psNext)
|
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
intAddTransporterLaunch(psDroid);
|
intAddTransporterLaunch(psDroid);
|
||||||
break;
|
break;
|
||||||
|
@ -3260,10 +3252,9 @@ void resetMissionWidgets(void)
|
||||||
one sitting in the mission list which is waiting to come back in*/
|
one sitting in the mission list which is waiting to come back in*/
|
||||||
if (!psDroid)
|
if (!psDroid)
|
||||||
{
|
{
|
||||||
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL;
|
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
psDroid = psDroid->psNext)
|
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER &&
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) &&
|
||||||
psDroid->action == DACTION_TRANSPORTWAITTOFLYIN)
|
psDroid->action == DACTION_TRANSPORTWAITTOFLYIN)
|
||||||
{
|
{
|
||||||
intAddTransporterLaunch(psDroid);
|
intAddTransporterLaunch(psDroid);
|
||||||
|
@ -3293,11 +3284,10 @@ void emptyTransporters(bool bOffWorld)
|
||||||
DROID *psTransporter, *psDroid, *psNext, *psNextTrans;
|
DROID *psTransporter, *psDroid, *psNext, *psNextTrans;
|
||||||
|
|
||||||
//see if there are any Transporters in the world
|
//see if there are any Transporters in the world
|
||||||
for (psTransporter = apsDroidLists[selectedPlayer]; psTransporter != NULL;
|
for (psTransporter = apsDroidLists[selectedPlayer]; psTransporter != NULL; psTransporter = psNextTrans)
|
||||||
psTransporter = psNextTrans)
|
|
||||||
{
|
{
|
||||||
psNextTrans = psTransporter->psNext;
|
psNextTrans = psTransporter->psNext;
|
||||||
if (psTransporter->droidType == DROID_TRANSPORTER)
|
if (psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
//if flying in, empty the contents
|
//if flying in, empty the contents
|
||||||
if (orderState(psTransporter, DORDER_TRANSPORTIN))
|
if (orderState(psTransporter, DORDER_TRANSPORTIN))
|
||||||
|
@ -3339,7 +3329,7 @@ void emptyTransporters(bool bOffWorld)
|
||||||
for (psTransporter = mission.apsDroidLists[selectedPlayer]; psTransporter !=
|
for (psTransporter = mission.apsDroidLists[selectedPlayer]; psTransporter !=
|
||||||
NULL; psTransporter = psTransporter->psNext)
|
NULL; psTransporter = psTransporter->psNext)
|
||||||
{
|
{
|
||||||
if (psTransporter->droidType == DROID_TRANSPORTER)
|
if (psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
//for each droid within the transporter...
|
//for each droid within the transporter...
|
||||||
for (psDroid = psTransporter->psGroup->psList; psDroid != NULL
|
for (psDroid = psTransporter->psGroup->psList; psDroid != NULL
|
||||||
|
|
22
src/move.cpp
22
src/move.cpp
|
@ -223,7 +223,7 @@ static bool moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, bool bFormation,
|
||||||
CHECK_DROID(psDroid);
|
CHECK_DROID(psDroid);
|
||||||
|
|
||||||
// in multiPlayer make Transporter move like the vtols
|
// in multiPlayer make Transporter move like the vtols
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER && game.maxPlayers == 0)
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && game.maxPlayers == 0)
|
||||||
{
|
{
|
||||||
fpathSetDirectRoute(psDroid, x, y);
|
fpathSetDirectRoute(psDroid, x, y);
|
||||||
psDroid->sMove.Status = MOVENAVIGATE;
|
psDroid->sMove.Status = MOVENAVIGATE;
|
||||||
|
@ -231,7 +231,7 @@ static bool moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, bool bFormation,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// NOTE: While Vtols can fly, then can't go through things, like the transporter.
|
// NOTE: While Vtols can fly, then can't go through things, like the transporter.
|
||||||
else if ((game.maxPlayers > 0 && psDroid->droidType == DROID_TRANSPORTER))
|
else if ((game.maxPlayers > 0 && (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
fpathSetDirectRoute(psDroid, x, y);
|
fpathSetDirectRoute(psDroid, x, y);
|
||||||
retVal = FPR_OK;
|
retVal = FPR_OK;
|
||||||
|
@ -487,7 +487,7 @@ void updateDroidOrientation(DROID *psDroid)
|
||||||
const int d = 20;
|
const int d = 20;
|
||||||
int32_t vX, vY;
|
int32_t vX, vY;
|
||||||
|
|
||||||
if(psDroid->droidType == DROID_PERSON || cyborgDroid(psDroid) || psDroid->droidType == DROID_TRANSPORTER
|
if(psDroid->droidType == DROID_PERSON || cyborgDroid(psDroid) || psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER
|
||||||
|| isFlying(psDroid))
|
|| isFlying(psDroid))
|
||||||
{
|
{
|
||||||
/* The ground doesn't affect the pitch/roll of these droids*/
|
/* The ground doesn't affect the pitch/roll of these droids*/
|
||||||
|
@ -1625,7 +1625,7 @@ static void moveUpdateDroidPos(DROID *psDroid, int32_t dx, int32_t dy)
|
||||||
if ( worldOnMap( psDroid->pos.x, psDroid->pos.y ) == false )
|
if ( worldOnMap( psDroid->pos.x, psDroid->pos.y ) == false )
|
||||||
{
|
{
|
||||||
/* transporter going off-world will trigger next map, and is ok */
|
/* transporter going off-world will trigger next map, and is ok */
|
||||||
ASSERT(psDroid->droidType == DROID_TRANSPORTER, "droid trying to move off the map!");
|
ASSERT(psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER, "droid trying to move off the map!");
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER)
|
if (psDroid->droidType != DROID_TRANSPORTER)
|
||||||
{
|
{
|
||||||
/* dreadful last-ditch crash-avoiding hack - sort this! - GJ */
|
/* dreadful last-ditch crash-avoiding hack - sort this! - GJ */
|
||||||
|
@ -1636,7 +1636,7 @@ static void moveUpdateDroidPos(DROID *psDroid, int32_t dx, int32_t dy)
|
||||||
|
|
||||||
// lovely hack to keep transporters just on the map
|
// lovely hack to keep transporters just on the map
|
||||||
// two weeks to go and the hacks just get better !!!
|
// two weeks to go and the hacks just get better !!!
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
if (psDroid->pos.x == 0)
|
if (psDroid->pos.x == 0)
|
||||||
{
|
{
|
||||||
|
@ -1836,7 +1836,7 @@ static void moveUpdatePersonModel(DROID *psDroid, SDWORD speed, uint16_t directi
|
||||||
static void moveAdjustVtolHeight(DROID * psDroid, int32_t iMapHeight)
|
static void moveAdjustVtolHeight(DROID * psDroid, int32_t iMapHeight)
|
||||||
{
|
{
|
||||||
int32_t iMinHeight, iMaxHeight, iLevelHeight;
|
int32_t iMinHeight, iMaxHeight, iLevelHeight;
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER && !bMultiPlayer )
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && !bMultiPlayer)
|
||||||
{
|
{
|
||||||
iMinHeight = 2*VTOL_HEIGHT_MIN;
|
iMinHeight = 2*VTOL_HEIGHT_MIN;
|
||||||
iLevelHeight = 2*VTOL_HEIGHT_LEVEL;
|
iLevelHeight = 2*VTOL_HEIGHT_LEVEL;
|
||||||
|
@ -1894,7 +1894,7 @@ static void moveUpdateVtolModel(DROID *psDroid, SDWORD speed, uint16_t direction
|
||||||
|
|
||||||
moveCheckFinalWaypoint( psDroid, &speed );
|
moveCheckFinalWaypoint( psDroid, &speed );
|
||||||
|
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER )
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
moveUpdateDroidDirection(psDroid, &speed, direction, VTOL_SPIN_ANGLE, VTOL_SPIN_SPEED, VTOL_TURN_SPEED, &iDroidDir);
|
moveUpdateDroidDirection(psDroid, &speed, direction, VTOL_SPIN_ANGLE, VTOL_SPIN_SPEED, VTOL_TURN_SPEED, &iDroidDir);
|
||||||
}
|
}
|
||||||
|
@ -2156,7 +2156,7 @@ bool moveCheckDroidMovingAndVisible( void *psObj )
|
||||||
|
|
||||||
/* check for dead, not moving or invisible to player */
|
/* check for dead, not moving or invisible to player */
|
||||||
if ( psDroid->died || moveDroidStopped( psDroid, 0 ) ||
|
if ( psDroid->died || moveDroidStopped( psDroid, 0 ) ||
|
||||||
(psDroid->droidType == DROID_TRANSPORTER && psDroid->order.type == DORDER_NONE) ||
|
((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && psDroid->order.type == DORDER_NONE) ||
|
||||||
!(psDroid->visible[selectedPlayer]) )
|
!(psDroid->visible[selectedPlayer]) )
|
||||||
{
|
{
|
||||||
psDroid->iAudioID = NO_SOUND;
|
psDroid->iAudioID = NO_SOUND;
|
||||||
|
@ -2187,7 +2187,7 @@ static void movePlayDroidMoveAudio( DROID *psDroid )
|
||||||
{
|
{
|
||||||
iAudioID = ID_SOUND_TREAD;
|
iAudioID = ID_SOUND_TREAD;
|
||||||
}
|
}
|
||||||
else if (psDroid->droidType == DROID_TRANSPORTER)
|
else if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
iAudioID = ID_SOUND_BLIMP_FLIGHT;
|
iAudioID = ID_SOUND_BLIMP_FLIGHT;
|
||||||
}
|
}
|
||||||
|
@ -2255,7 +2255,7 @@ static void movePlayAudio( DROID *psDroid, bool bStarted, bool bStoppedBefore, S
|
||||||
movePlayDroidMoveAudio( psDroid );
|
movePlayDroidMoveAudio( psDroid );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( psDroid->droidType == DROID_TRANSPORTER )
|
else if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
iAudioID = ID_SOUND_BLIMP_TAKE_OFF;
|
iAudioID = ID_SOUND_BLIMP_TAKE_OFF;
|
||||||
}
|
}
|
||||||
|
@ -2270,7 +2270,7 @@ static void movePlayAudio( DROID *psDroid, bool bStarted, bool bStoppedBefore, S
|
||||||
(psPropType->shutDownID != NO_SOUND) )
|
(psPropType->shutDownID != NO_SOUND) )
|
||||||
{
|
{
|
||||||
/* play stop audio */
|
/* play stop audio */
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER )
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
iAudioID = ID_SOUND_BLIMP_LAND;
|
iAudioID = ID_SOUND_BLIMP_LAND;
|
||||||
}
|
}
|
||||||
|
|
|
@ -990,7 +990,7 @@ void objCount(int *droids, int *structures, int *features)
|
||||||
for (DROID *psDroid = apsDroidLists[i]; psDroid; psDroid = psDroid->psNext)
|
for (DROID *psDroid = apsDroidLists[i]; psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
(*droids)++;
|
(*droids)++;
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
DROID *psTrans = psDroid->psGroup->psList;
|
DROID *psTrans = psDroid->psGroup->psList;
|
||||||
|
|
||||||
|
|
|
@ -320,7 +320,7 @@ void orderUpdateDroid(DROID *psDroid)
|
||||||
{
|
{
|
||||||
orderDroidObj(psDroid, DORDER_GUARD, psDroid->psGroup->psCommander, ModeImmediate);
|
orderDroidObj(psDroid, DORDER_GUARD, psDroid->psGroup->psCommander, ModeImmediate);
|
||||||
}
|
}
|
||||||
else if (psDroid->droidType == DROID_TRANSPORTER && !bMultiPlayer)
|
else if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && !bMultiPlayer)
|
||||||
{
|
{
|
||||||
//check transporter isn't sitting there waiting to be filled when nothing exists!
|
//check transporter isn't sitting there waiting to be filled when nothing exists!
|
||||||
if (psDroid->player == selectedPlayer && getDroidsToSafetyFlag()
|
if (psDroid->player == selectedPlayer && getDroidsToSafetyFlag()
|
||||||
|
@ -792,7 +792,7 @@ void orderUpdateDroid(DROID *psDroid)
|
||||||
DROID *temp = NULL;
|
DROID *temp = NULL;
|
||||||
|
|
||||||
temp = (DROID*)psDroid->order.psObj;
|
temp = (DROID*)psDroid->order.psObj;
|
||||||
if (!strcmp("Cyborg Transport", temp->aName) && !cyborgDroid(psDroid))
|
if ((temp->droidType == DROID_TRANSPORTER) && !cyborgDroid(psDroid))
|
||||||
{
|
{
|
||||||
// NOTE: since we only have one type of transport (DROID_TRANSPORT), it isn't worth changing tons of code
|
// NOTE: since we only have one type of transport (DROID_TRANSPORT), it isn't worth changing tons of code
|
||||||
// to have two types available (DROID_TRANSPORT_SUPER), so we just check the name which can never be
|
// to have two types available (DROID_TRANSPORT_SUPER), so we just check the name which can never be
|
||||||
|
@ -843,7 +843,7 @@ void orderUpdateDroid(DROID *psDroid)
|
||||||
if (bMultiPlayer)
|
if (bMultiPlayer)
|
||||||
{
|
{
|
||||||
//this order can only be given to Transporter droids
|
//this order can only be given to Transporter droids
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
/*once the Transporter has reached its destination (and landed),
|
/*once the Transporter has reached its destination (and landed),
|
||||||
get all the units to disembark*/
|
get all the units to disembark*/
|
||||||
|
@ -1119,7 +1119,7 @@ void orderUpdateDroid(DROID *psDroid)
|
||||||
// repairing something, make sure the droid doesn't go too far
|
// repairing something, make sure the droid doesn't go too far
|
||||||
orderCheckGuardPosition(psDroid, CONSTRUCT_MAXDIST);
|
orderCheckGuardPosition(psDroid, CONSTRUCT_MAXDIST);
|
||||||
}
|
}
|
||||||
else if (psDroid->droidType == DROID_TRANSPORTER)
|
else if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
// check transporter isn't sitting there waiting to be filled when nothing exists!
|
// check transporter isn't sitting there waiting to be filled when nothing exists!
|
||||||
if (psDroid->player == selectedPlayer && getDroidsToSafetyFlag() &&
|
if (psDroid->player == selectedPlayer && getDroidsToSafetyFlag() &&
|
||||||
|
@ -1434,7 +1434,7 @@ void orderDroidBase(DROID *psDroid, DROID_ORDER_DATA *psOrder)
|
||||||
}
|
}
|
||||||
//in multiPlayer, cannot move Transporter to blocking tile either
|
//in multiPlayer, cannot move Transporter to blocking tile either
|
||||||
if (game.type == SKIRMISH
|
if (game.type == SKIRMISH
|
||||||
&& psDroid->droidType == DROID_TRANSPORTER
|
&& (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
&& fpathBlockingTile(map_coord(psOrder->pos), getPropulsionStats(psDroid)->propulsionType))
|
&& fpathBlockingTile(map_coord(psOrder->pos), getPropulsionStats(psDroid)->propulsionType))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -1471,7 +1471,7 @@ void orderDroidBase(DROID *psDroid, DROID_ORDER_DATA *psOrder)
|
||||||
case DORDER_ATTACKTARGET:
|
case DORDER_ATTACKTARGET:
|
||||||
if (psDroid->numWeaps == 0
|
if (psDroid->numWeaps == 0
|
||||||
|| psDroid->asWeaps[0].nStat == 0
|
|| psDroid->asWeaps[0].nStat == 0
|
||||||
|| psDroid->droidType == DROID_TRANSPORTER)
|
|| psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1631,7 +1631,7 @@ void orderDroidBase(DROID *psDroid, DROID_ORDER_DATA *psOrder)
|
||||||
|
|
||||||
psDroid->order = *psOrder;
|
psDroid->order = *psOrder;
|
||||||
// Find a place to land for vtols. And Transporters in a multiPlay game.
|
// Find a place to land for vtols. And Transporters in a multiPlay game.
|
||||||
if (isVtolDroid(psDroid) || (game.type == SKIRMISH && psDroid->droidType == DROID_TRANSPORTER))
|
if (isVtolDroid(psDroid) || (game.type == SKIRMISH && (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
actionVTOLLandingPos(psDroid, &droidX,&droidY);
|
actionVTOLLandingPos(psDroid, &droidX,&droidY);
|
||||||
}
|
}
|
||||||
|
@ -1717,7 +1717,7 @@ void orderDroidBase(DROID *psDroid, DROID_ORDER_DATA *psOrder)
|
||||||
psDroid->order.pos = removeZ(psRepairFac->pos);
|
psDroid->order.pos = removeZ(psRepairFac->pos);
|
||||||
/* If in multiPlayer, and the Transporter has been sent to be
|
/* If in multiPlayer, and the Transporter has been sent to be
|
||||||
* repaired, need to find a suitable location to drop down. */
|
* repaired, need to find a suitable location to drop down. */
|
||||||
if (game.type == SKIRMISH && psDroid->droidType == DROID_TRANSPORTER)
|
if (game.type == SKIRMISH && (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
UDWORD droidX, droidY;
|
UDWORD droidX, droidY;
|
||||||
droidX = psDroid->order.pos.x;
|
droidX = psDroid->order.pos.x;
|
||||||
|
@ -1758,7 +1758,7 @@ void orderDroidBase(DROID *psDroid, DROID_ORDER_DATA *psOrder)
|
||||||
if (bMultiPlayer)
|
if (bMultiPlayer)
|
||||||
{
|
{
|
||||||
//this order can only be given to Transporter droids
|
//this order can only be given to Transporter droids
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
psDroid->order = *psOrder;
|
psDroid->order = *psOrder;
|
||||||
//move the Transporter to the requested location
|
//move the Transporter to the requested location
|
||||||
|
@ -2415,7 +2415,7 @@ DROID_ORDER chooseOrderLoc(DROID *psDroid, UDWORD x,UDWORD y, bool altOrder)
|
||||||
DROID_ORDER order = DORDER_NONE;
|
DROID_ORDER order = DORDER_NONE;
|
||||||
PROPULSION_TYPE propulsion = getPropulsionStats(psDroid)->propulsionType;
|
PROPULSION_TYPE propulsion = getPropulsionStats(psDroid)->propulsionType;
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER && game.type == CAMPAIGN)
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && game.type == CAMPAIGN)
|
||||||
{
|
{
|
||||||
// transports can't be controlled in campaign
|
// transports can't be controlled in campaign
|
||||||
return DORDER_NONE;
|
return DORDER_NONE;
|
||||||
|
@ -2444,7 +2444,7 @@ DROID_ORDER chooseOrderLoc(DROID *psDroid, UDWORD x,UDWORD y, bool altOrder)
|
||||||
}
|
}
|
||||||
|
|
||||||
// and now we want Transporters to fly! - in multiPlayer!!
|
// and now we want Transporters to fly! - in multiPlayer!!
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER && game.type == SKIRMISH)
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) && game.type == SKIRMISH)
|
||||||
{
|
{
|
||||||
/* in MultiPlayer - if ALT-key is pressed then need to get the Transporter
|
/* in MultiPlayer - if ALT-key is pressed then need to get the Transporter
|
||||||
* to fly to location and all units disembark */
|
* to fly to location and all units disembark */
|
||||||
|
@ -2555,7 +2555,7 @@ DroidOrder chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj, bool altOrder)
|
||||||
DroidOrder order(DORDER_NONE);
|
DroidOrder order(DORDER_NONE);
|
||||||
STRUCTURE *psStruct;
|
STRUCTURE *psStruct;
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
//in multiPlayer, need to be able to get Transporter repaired
|
//in multiPlayer, need to be able to get Transporter repaired
|
||||||
if (bMultiPlayer)
|
if (bMultiPlayer)
|
||||||
|
@ -2594,7 +2594,7 @@ DroidOrder chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj, bool altOrder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//check for transporters first
|
//check for transporters first
|
||||||
if (psObj->type == OBJ_DROID && ((DROID *)psObj)->droidType == DROID_TRANSPORTER && psObj->player == psDroid->player)
|
if (psObj->type == OBJ_DROID && (((DROID *)psObj)->droidType == DROID_TRANSPORTER || ((DROID *)psObj)->droidType == DROID_SUPERTRANSPORTER) && psObj->player == psDroid->player)
|
||||||
{
|
{
|
||||||
order = DroidOrder(DORDER_EMBARK, psObj);
|
order = DroidOrder(DORDER_EMBARK, psObj);
|
||||||
}
|
}
|
||||||
|
@ -2915,7 +2915,8 @@ DROID *FindATransporter(unsigned player)
|
||||||
|
|
||||||
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if( psDroid->droidType == DROID_TRANSPORTER ) {
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
|
{
|
||||||
return psDroid;
|
return psDroid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3651,7 +3652,7 @@ bool secondaryGotPrimaryOrder(DROID *psDroid, DROID_ORDER order)
|
||||||
{
|
{
|
||||||
UDWORD oldState;
|
UDWORD oldState;
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3911,7 +3912,7 @@ void orderHealthCheck(DROID *psDroid)
|
||||||
SBYTE healthLevel = 0;
|
SBYTE healthLevel = 0;
|
||||||
UDWORD retreatX = 0, retreatY = 0;
|
UDWORD retreatX = 0, retreatY = 0;
|
||||||
|
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1469,6 +1469,7 @@ static ObjectShape establishTargetShape(BASE_OBJECT *psTarget)
|
||||||
return abs(psTarget->sDisplay.imd->radius) * 2;
|
return abs(psTarget->sDisplay.imd->radius) * 2;
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
default:
|
default:
|
||||||
return TILE_UNITS/4; // how will we arrive at this?
|
return TILE_UNITS/4; // how will we arrive at this?
|
||||||
}
|
}
|
||||||
|
@ -1701,6 +1702,7 @@ int establishTargetHeight(BASE_OBJECT const *psTarget)
|
||||||
case DROID_CYBORG_SUPER:
|
case DROID_CYBORG_SUPER:
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
// Commanders don't have pIMD either
|
// Commanders don't have pIMD either
|
||||||
case DROID_COMMAND:
|
case DROID_COMMAND:
|
||||||
case DROID_ANY:
|
case DROID_ANY:
|
||||||
|
|
|
@ -706,6 +706,7 @@ static QScriptValue js_addDroid(QScriptContext *context, QScriptEngine *engine)
|
||||||
case DROID_WEAPON:
|
case DROID_WEAPON:
|
||||||
case DROID_CYBORG:
|
case DROID_CYBORG:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_CYBORG_SUPER:
|
case DROID_CYBORG_SUPER:
|
||||||
j = getCompFromName(COMP_WEAPON, context->argument(8 + i).toString().toUtf8().constData());
|
j = getCompFromName(COMP_WEAPON, context->argument(8 + i).toString().toUtf8().constData());
|
||||||
|
@ -865,6 +866,7 @@ static QScriptValue js_buildDroid(QScriptContext *context, QScriptEngine *engine
|
||||||
case DROID_WEAPON:
|
case DROID_WEAPON:
|
||||||
case DROID_CYBORG:
|
case DROID_CYBORG:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_CYBORG_SUPER:
|
case DROID_CYBORG_SUPER:
|
||||||
j = get_first_available_component(psStruct, context->argument(6 + i), COMP_WEAPON);
|
j = get_first_available_component(psStruct, context->argument(6 + i), COMP_WEAPON);
|
||||||
|
@ -1480,7 +1482,7 @@ static QScriptValue js_setReinforcementTime(QScriptContext *context, QScriptEngi
|
||||||
* time to -1 at the between stage if there are not going to be reinforcements on the submap */
|
* time to -1 at the between stage if there are not going to be reinforcements on the submap */
|
||||||
for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -949,7 +949,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidSensorUpgrade(psDroid);
|
droidSensorUpgrade(psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -957,7 +957,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = mission.apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = mission.apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidSensorUpgrade(psDroid);
|
droidSensorUpgrade(psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -965,7 +965,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = apsLimboDroids[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsLimboDroids[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidSensorUpgrade(psDroid);
|
droidSensorUpgrade(psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -988,7 +988,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidECMUpgrade(psDroid);
|
droidECMUpgrade(psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidECMUpgrade);
|
upgradeTransporterDroids(psDroid, droidECMUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -996,7 +996,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = mission.apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = mission.apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidECMUpgrade(psDroid);
|
droidECMUpgrade(psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidECMUpgrade);
|
upgradeTransporterDroids(psDroid, droidECMUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1004,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = apsLimboDroids[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsLimboDroids[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidECMUpgrade(psDroid);
|
droidECMUpgrade(psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidECMUpgrade);
|
upgradeTransporterDroids(psDroid, droidECMUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -1030,7 +1030,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = mission.apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = mission.apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidBodyUpgrade(pFunction, psDroid);
|
droidBodyUpgrade(pFunction, psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -1038,7 +1038,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, bool bDisplay, STRUCTURE
|
||||||
for (psDroid = apsLimboDroids[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
for (psDroid = apsLimboDroids[player]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
droidBodyUpgrade(pFunction, psDroid);
|
droidBodyUpgrade(pFunction, psDroid);
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
upgradeTransporterDroids(psDroid, droidSensorUpgrade);
|
||||||
}
|
}
|
||||||
|
@ -1973,7 +1973,7 @@ void replaceDroidComponent(DROID *pList, UDWORD oldType, UDWORD oldCompInc,
|
||||||
{
|
{
|
||||||
switchComponent(psDroid, oldType, oldCompInc, newCompInc);
|
switchComponent(psDroid, oldType, oldCompInc, newCompInc);
|
||||||
// Need to replace the units inside the transporter
|
// Need to replace the units inside the transporter
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
replaceTransDroidComponents(psDroid, oldType, oldCompInc, newCompInc);
|
replaceTransDroidComponents(psDroid, oldType, oldCompInc, newCompInc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ bool scrGroupAddDroid(void)
|
||||||
"scrGroupAdd: cannot add a command droid to a group" );
|
"scrGroupAdd: cannot add a command droid to a group" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
debug( LOG_ERROR,
|
debug( LOG_ERROR,
|
||||||
"scrGroupAdd: cannot add a transporter to a group" );
|
"scrGroupAdd: cannot add a transporter to a group" );
|
||||||
|
@ -1069,6 +1069,7 @@ static UDWORD scrDroidTargetMask(DROID *psDroid)
|
||||||
mask |= SCR_DT_REPAIR;
|
mask |= SCR_DT_REPAIR;
|
||||||
break;
|
break;
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
break;
|
break;
|
||||||
case DROID_DEFAULT:
|
case DROID_DEFAULT:
|
||||||
case DROID_ANY:
|
case DROID_ANY:
|
||||||
|
@ -1476,6 +1477,7 @@ bool scrSkCanBuildTemplate(void)
|
||||||
|
|
||||||
case DROID_PERSON: // person
|
case DROID_PERSON: // person
|
||||||
case DROID_TRANSPORTER: // guess what this is!
|
case DROID_TRANSPORTER: // guess what this is!
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
case DROID_DEFAULT: // Default droid
|
case DROID_DEFAULT: // Default droid
|
||||||
case DROID_ANY:
|
case DROID_ANY:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -4660,7 +4660,7 @@ bool scrSetReinforcementTime(void)
|
||||||
for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid =
|
for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid =
|
||||||
psDroid->psNext)
|
psDroid->psNext)
|
||||||
{
|
{
|
||||||
if (psDroid->droidType == DROID_TRANSPORTER)
|
if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -7042,9 +7042,9 @@ bool ThreatInRange(SDWORD player, SDWORD range, SDWORD rangeX, SDWORD rangeY, bo
|
||||||
}
|
}
|
||||||
|
|
||||||
//check droids
|
//check droids
|
||||||
for(psDroid = apsDroidLists[i]; psDroid; psDroid = psDroid->psNext)
|
for (psDroid = apsDroidLists[i]; psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if(psDroid->visible[player]) //can see this droid?
|
if (psDroid->visible[player]) //can see this droid?
|
||||||
{
|
{
|
||||||
if (!objHasWeapon((BASE_OBJECT *)psDroid))
|
if (!objHasWeapon((BASE_OBJECT *)psDroid))
|
||||||
{
|
{
|
||||||
|
@ -7052,7 +7052,7 @@ bool ThreatInRange(SDWORD player, SDWORD range, SDWORD rangeX, SDWORD rangeY, bo
|
||||||
}
|
}
|
||||||
|
|
||||||
//if VTOLs are excluded, skip them
|
//if VTOLs are excluded, skip them
|
||||||
if(!bVTOLs && ((asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_TRANSPORTER)))
|
if (!bVTOLs && ((asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -7622,15 +7622,12 @@ bool scrFriendlyWeapObjCostInRange(void)
|
||||||
static UDWORD costOrAmountInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range,
|
static UDWORD costOrAmountInRange(SDWORD player, SDWORD lookingPlayer, SDWORD range,
|
||||||
SDWORD rangeX, SDWORD rangeY, bool bVTOLs, bool justCount)
|
SDWORD rangeX, SDWORD rangeY, bool bVTOLs, bool justCount)
|
||||||
{
|
{
|
||||||
UDWORD droidCost;
|
UDWORD droidCost = 0;
|
||||||
DROID *psDroid;
|
|
||||||
|
|
||||||
droidCost = 0;
|
|
||||||
|
|
||||||
//check droids
|
//check droids
|
||||||
for(psDroid = apsDroidLists[player]; psDroid; psDroid = psDroid->psNext)
|
for (DROID *psDroid = apsDroidLists[player]; psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if(psDroid->visible[lookingPlayer]) //can see this droid?
|
if (psDroid->visible[lookingPlayer]) //can see this droid?
|
||||||
{
|
{
|
||||||
if (!objHasWeapon((BASE_OBJECT *)psDroid))
|
if (!objHasWeapon((BASE_OBJECT *)psDroid))
|
||||||
{
|
{
|
||||||
|
@ -7638,7 +7635,7 @@ static UDWORD costOrAmountInRange(SDWORD player, SDWORD lookingPlayer, SDWORD ra
|
||||||
}
|
}
|
||||||
|
|
||||||
//if VTOLs are excluded, skip them
|
//if VTOLs are excluded, skip them
|
||||||
if(!bVTOLs && ((asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_TRANSPORTER)))
|
if (!bVTOLs && ((asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -8036,7 +8033,7 @@ UDWORD numEnemyObjInRange(SDWORD player, SDWORD range, SDWORD rangeX, SDWORD ran
|
||||||
//if VTOLs are excluded, skip them
|
//if VTOLs are excluded, skip them
|
||||||
if (!bVTOLs
|
if (!bVTOLs
|
||||||
&& (asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT
|
&& (asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT
|
||||||
|| psDroid->droidType == DROID_TRANSPORTER))
|
|| psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -8533,18 +8530,18 @@ bool scrGetClosestEnemy(void)
|
||||||
|
|
||||||
bestDist = 99999;
|
bestDist = 99999;
|
||||||
|
|
||||||
for(i=0;i<MAX_PLAYERS;i++)
|
for (i=0;i<MAX_PLAYERS;i++)
|
||||||
{
|
{
|
||||||
if((alliances[player][i] == ALLIANCE_FORMED) || (i == player))
|
if ((alliances[player][i] == ALLIANCE_FORMED) || (i == player))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//check droids
|
//check droids
|
||||||
for(psDroid = apsDroidLists[i]; psDroid; psDroid = psDroid->psNext)
|
for (psDroid = apsDroidLists[i]; psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if(psDroid->visible[player]) //can see this droid?
|
if (psDroid->visible[player]) //can see this droid?
|
||||||
{
|
{
|
||||||
//if only weapon droids and don't have it, then skip
|
//if only weapon droids and don't have it, then skip
|
||||||
if (weaponOnly && !objHasWeapon((BASE_OBJECT *)psDroid))
|
if (weaponOnly && !objHasWeapon((BASE_OBJECT *)psDroid))
|
||||||
|
@ -8553,13 +8550,13 @@ bool scrGetClosestEnemy(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//if VTOLs are excluded, skip them
|
//if VTOLs are excluded, skip them
|
||||||
if(!bVTOLs && ((asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_TRANSPORTER)))
|
if (!bVTOLs && ((asPropulsionStats[psDroid->asBits[COMP_PROPULSION].nStat].propulsionType == PROPULSION_TYPE_LIFT) || (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
dist = world_coord(hypotf(tx - map_coord(psDroid->pos.x), ty - map_coord(psDroid->pos.y)));
|
dist = world_coord(hypotf(tx - map_coord(psDroid->pos.x), ty - map_coord(psDroid->pos.y)));
|
||||||
if(dist < bestDist)
|
if (dist < bestDist)
|
||||||
{
|
{
|
||||||
if((range < 0) || (dist < range)) //enemy in range
|
if((range < 0) || (dist < range)) //enemy in range
|
||||||
{
|
{
|
||||||
|
@ -8573,20 +8570,20 @@ bool scrGetClosestEnemy(void)
|
||||||
|
|
||||||
|
|
||||||
//check structures
|
//check structures
|
||||||
for(psStruct = apsStructLists[i]; psStruct; psStruct=psStruct->psNext)
|
for (psStruct = apsStructLists[i]; psStruct; psStruct=psStruct->psNext)
|
||||||
{
|
{
|
||||||
if(psStruct->visible[player]) //if can see it
|
if (psStruct->visible[player]) //if can see it
|
||||||
{
|
{
|
||||||
//only need defenses?
|
//only need defenses?
|
||||||
if(weaponOnly && (!objHasWeapon((BASE_OBJECT *) psStruct) || (psStruct->status != SS_BUILT) )) //non-weapon-structures or not finished
|
if (weaponOnly && (!objHasWeapon((BASE_OBJECT *) psStruct) || (psStruct->status != SS_BUILT) )) //non-weapon-structures or not finished
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
dist = world_coord(hypotf(tx - map_coord(psStruct->pos.x), ty - map_coord(psStruct->pos.y)));
|
dist = world_coord(hypotf(tx - map_coord(psStruct->pos.x), ty - map_coord(psStruct->pos.y)));
|
||||||
if(dist < bestDist)
|
if (dist < bestDist)
|
||||||
{
|
{
|
||||||
if((range < 0) || (dist < range)) //in range
|
if ((range < 0) || (dist < range)) //in range
|
||||||
{
|
{
|
||||||
bestDist = dist;
|
bestDist = dist;
|
||||||
bFound = true;
|
bFound = true;
|
||||||
|
@ -8598,7 +8595,7 @@ bool scrGetClosestEnemy(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bFound)
|
if (bFound)
|
||||||
{
|
{
|
||||||
scrFunctionResult.v.oval = psObj;
|
scrFunctionResult.v.oval = psObj;
|
||||||
if (!stackPushResult((INTERP_TYPE)ST_BASEOBJECT, &scrFunctionResult))
|
if (!stackPushResult((INTERP_TYPE)ST_BASEOBJECT, &scrFunctionResult))
|
||||||
|
|
|
@ -1754,6 +1754,7 @@ CONST_SYMBOL asConstantTable[] =
|
||||||
{ "DROID_PERSON", VAL_INT, false, DROID_PERSON, NULL, NULL, 0.0f },
|
{ "DROID_PERSON", VAL_INT, false, DROID_PERSON, NULL, NULL, 0.0f },
|
||||||
{ "DROID_CYBORG", VAL_INT, false, DROID_CYBORG, NULL, NULL, 0.0f },
|
{ "DROID_CYBORG", VAL_INT, false, DROID_CYBORG, NULL, NULL, 0.0f },
|
||||||
{ "DROID_CYBORG_SUPER", VAL_INT, false, DROID_CYBORG_SUPER, NULL, NULL, 0.0f },
|
{ "DROID_CYBORG_SUPER", VAL_INT, false, DROID_CYBORG_SUPER, NULL, NULL, 0.0f },
|
||||||
|
{ "DROID_SUPERTRANSPORTER", VAL_INT, false, DROID_SUPERTRANSPORTER, NULL, NULL, 0.0f },
|
||||||
{ "DROID_TRANSPORTER", VAL_INT, false, DROID_TRANSPORTER, NULL, NULL, 0.0f },
|
{ "DROID_TRANSPORTER", VAL_INT, false, DROID_TRANSPORTER, NULL, NULL, 0.0f },
|
||||||
{ "DROID_COMMAND", VAL_INT, false, DROID_COMMAND, NULL, NULL, 0.0f },
|
{ "DROID_COMMAND", VAL_INT, false, DROID_COMMAND, NULL, NULL, 0.0f },
|
||||||
{ "DROID_REPAIR", VAL_INT, false, DROID_REPAIR, NULL, NULL, 0.0f },
|
{ "DROID_REPAIR", VAL_INT, false, DROID_REPAIR, NULL, NULL, 0.0f },
|
||||||
|
|
|
@ -3287,7 +3287,7 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool isMission)
|
||||||
if (psDroid->body < psDroid->originalBody)
|
if (psDroid->body < psDroid->originalBody)
|
||||||
{
|
{
|
||||||
//if in multiPlayer, and a Transporter - make sure its on the ground before repairing
|
//if in multiPlayer, and a Transporter - make sure its on the ground before repairing
|
||||||
if (bMultiPlayer && psDroid->droidType == DROID_TRANSPORTER)
|
if (bMultiPlayer && (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
if (!(psDroid->sMove.Status == MOVEINACTIVE &&
|
if (!(psDroid->sMove.Status == MOVEINACTIVE &&
|
||||||
psDroid->sMove.iVertSpeed == 0))
|
psDroid->sMove.iVertSpeed == 0))
|
||||||
|
|
|
@ -56,6 +56,7 @@ static const StringToEnum<DROID_TYPE> map_DROID_TYPE[] =
|
||||||
{"CYBORG_CONSTRUCT", DROID_CYBORG_CONSTRUCT },
|
{"CYBORG_CONSTRUCT", DROID_CYBORG_CONSTRUCT },
|
||||||
{"CYBORG_REPAIR", DROID_CYBORG_REPAIR },
|
{"CYBORG_REPAIR", DROID_CYBORG_REPAIR },
|
||||||
{"TRANSPORTER", DROID_TRANSPORTER },
|
{"TRANSPORTER", DROID_TRANSPORTER },
|
||||||
|
{"SUPERTRANSPORTER", DROID_SUPERTRANSPORTER },
|
||||||
{"ZNULLDROID", DROID_ANY },
|
{"ZNULLDROID", DROID_ANY },
|
||||||
{"DROID", DROID_DEFAULT },
|
{"DROID", DROID_DEFAULT },
|
||||||
};
|
};
|
||||||
|
@ -71,6 +72,7 @@ bool researchedTemplate(DROID_TEMPLATE *psCurr, int player)
|
||||||
case DROID_CYBORG_CONSTRUCT:
|
case DROID_CYBORG_CONSTRUCT:
|
||||||
case DROID_CYBORG_REPAIR:
|
case DROID_CYBORG_REPAIR:
|
||||||
case DROID_TRANSPORTER:
|
case DROID_TRANSPORTER:
|
||||||
|
case DROID_SUPERTRANSPORTER:
|
||||||
return (apCompLists[player][COMP_BODY][psCurr->asParts[COMP_BODY]] == AVAILABLE);
|
return (apCompLists[player][COMP_BODY][psCurr->asParts[COMP_BODY]] == AVAILABLE);
|
||||||
default:
|
default:
|
||||||
break; // now proceed to normal droids...
|
break; // now proceed to normal droids...
|
||||||
|
|
|
@ -527,7 +527,7 @@ bool intAddTransButtonForm(void)
|
||||||
for(psDroid = transInterfaceDroidList(); psDroid; psDroid = psDroid->psNext)
|
for(psDroid = transInterfaceDroidList(); psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
//only interested in Transporter droids
|
//only interested in Transporter droids
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER &&
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) &&
|
||||||
(psDroid->action != DACTION_TRANSPORTOUT &&
|
(psDroid->action != DACTION_TRANSPORTOUT &&
|
||||||
psDroid->action != DACTION_TRANSPORTIN ) )
|
psDroid->action != DACTION_TRANSPORTIN ) )
|
||||||
{
|
{
|
||||||
|
@ -586,7 +586,7 @@ bool intAddTransButtonForm(void)
|
||||||
//add each button
|
//add each button
|
||||||
for(psDroid = transInterfaceDroidList(); psDroid; psDroid = psDroid->psNext)
|
for(psDroid = transInterfaceDroidList(); psDroid; psDroid = psDroid->psNext)
|
||||||
{
|
{
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER &&
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) &&
|
||||||
(psDroid->action != DACTION_TRANSPORTOUT &&
|
(psDroid->action != DACTION_TRANSPORTOUT &&
|
||||||
psDroid->action != DACTION_TRANSPORTIN ) )
|
psDroid->action != DACTION_TRANSPORTIN ) )
|
||||||
{
|
{
|
||||||
|
@ -851,11 +851,10 @@ bool intAddDroidsAvailForm(void)
|
||||||
//calc num buttons
|
//calc num buttons
|
||||||
numButtons = 0;
|
numButtons = 0;
|
||||||
//look through the list of droids that were built before the mission
|
//look through the list of droids that were built before the mission
|
||||||
for(psDroid = mission.apsDroidLists[selectedPlayer]; psDroid; psDroid =
|
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
||||||
psDroid->psNext)
|
|
||||||
{
|
{
|
||||||
//ignore any Transporters!
|
//ignore any Transporters!
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER)
|
if (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
numButtons++;
|
numButtons++;
|
||||||
}
|
}
|
||||||
|
@ -920,8 +919,7 @@ bool intAddDroidsAvailForm(void)
|
||||||
sBarInit.sMinorCol = WZCOL_ACTION_PROGRESS_BAR_MINOR;
|
sBarInit.sMinorCol = WZCOL_ACTION_PROGRESS_BAR_MINOR;
|
||||||
|
|
||||||
//add droids built before the mission
|
//add droids built before the mission
|
||||||
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL;
|
for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext)
|
||||||
psDroid = psDroid->psNext)
|
|
||||||
{
|
{
|
||||||
//stop adding the buttons once MAX_DROIDS has been reached
|
//stop adding the buttons once MAX_DROIDS has been reached
|
||||||
if (sBFormInit.id == (IDTRANS_DROIDSTART + MAX_DROIDS))
|
if (sBFormInit.id == (IDTRANS_DROIDSTART + MAX_DROIDS))
|
||||||
|
@ -929,7 +927,7 @@ bool intAddDroidsAvailForm(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//don't add Transporter Droids!
|
//don't add Transporter Droids!
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER)
|
if ((psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER))
|
||||||
{
|
{
|
||||||
/* Set the tip and add the button */
|
/* Set the tip and add the button */
|
||||||
// sBFormInit.pTip = psDroid->pName;
|
// sBFormInit.pTip = psDroid->pName;
|
||||||
|
@ -1025,12 +1023,12 @@ UDWORD calcRemainingCapacity(DROID *psTransporter)
|
||||||
|
|
||||||
bool transporterIsEmpty(const DROID* psTransporter)
|
bool transporterIsEmpty(const DROID* psTransporter)
|
||||||
{
|
{
|
||||||
ASSERT(psTransporter->droidType == DROID_TRANSPORTER, "Non-transporter droid given");
|
ASSERT((psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER), "Non-transporter droid given");
|
||||||
|
|
||||||
// Assume dead droids and non-transporter droids to be empty
|
// Assume dead droids and non-transporter droids to be empty
|
||||||
return (isDead((const BASE_OBJECT*)psTransporter)
|
return (isDead((const BASE_OBJECT*)psTransporter)
|
||||||
|| psTransporter->droidType != DROID_TRANSPORTER
|
|| psTransporter->droidType != DROID_TRANSPORTER
|
||||||
|
|| psTransporter->droidType != DROID_SUPERTRANSPORTER
|
||||||
|| psTransporter->psGroup->psList == NULL
|
|| psTransporter->psGroup->psList == NULL
|
||||||
|| psTransporter->psGroup->psList == psTransporter);
|
|| psTransporter->psGroup->psList == psTransporter);
|
||||||
}
|
}
|
||||||
|
@ -1260,7 +1258,7 @@ void setCurrentTransporter(UDWORD id)
|
||||||
for (psDroid = transInterfaceDroidList(); psDroid != NULL; psDroid =
|
for (psDroid = transInterfaceDroidList(); psDroid != NULL; psDroid =
|
||||||
psDroid->psNext)
|
psDroid->psNext)
|
||||||
{
|
{
|
||||||
if ( psDroid->droidType == DROID_TRANSPORTER &&
|
if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) &&
|
||||||
(psDroid->action != DACTION_TRANSPORTOUT &&
|
(psDroid->action != DACTION_TRANSPORTOUT &&
|
||||||
psDroid->action != DACTION_TRANSPORTIN ) )
|
psDroid->action != DACTION_TRANSPORTIN ) )
|
||||||
{
|
{
|
||||||
|
@ -1370,7 +1368,7 @@ void intTransporterAddDroid(UDWORD id)
|
||||||
for (psDroid = transInterfaceDroidList(); psDroid != NULL; psDroid = psNext)
|
for (psDroid = transInterfaceDroidList(); psDroid != NULL; psDroid = psNext)
|
||||||
{
|
{
|
||||||
psNext = psDroid->psNext;
|
psNext = psDroid->psNext;
|
||||||
if (psDroid->droidType != DROID_TRANSPORTER)
|
if (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
if (currID == id)
|
if (currID == id)
|
||||||
{
|
{
|
||||||
|
@ -1449,14 +1447,10 @@ bool checkTransporterSpace(DROID *psTransporter, DROID *psAssigned)
|
||||||
DROID *psDroid, *psNext;
|
DROID *psDroid, *psNext;
|
||||||
UDWORD capacity;
|
UDWORD capacity;
|
||||||
|
|
||||||
ASSERT( psTransporter != NULL,
|
ASSERT (psTransporter != NULL, "Invalid droid pointer");
|
||||||
"checkTransporterSpace: Invalid droid pointer" );
|
ASSERT (psAssigned != NULL, "Invalid droid pointer");
|
||||||
ASSERT( psAssigned != NULL,
|
ASSERT ((psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER), "Droid is not a Transporter");
|
||||||
"checkTransporterSpace: Invalid droid pointer" );
|
ASSERT (psTransporter->psGroup != NULL, "tranporter doesn't have a group" );
|
||||||
ASSERT( psTransporter->droidType == DROID_TRANSPORTER,
|
|
||||||
"checkTransporterSpace: Droid is not a Transporter" );
|
|
||||||
ASSERT( psTransporter->psGroup != NULL,
|
|
||||||
"checkTransporterSpace: tranporter doesn't have a group" );
|
|
||||||
|
|
||||||
//work out how much space is currently left
|
//work out how much space is currently left
|
||||||
capacity = TRANSPORTER_CAPACITY;
|
capacity = TRANSPORTER_CAPACITY;
|
||||||
|
@ -1560,9 +1554,9 @@ bool launchTransporter(DROID *psTransporter)
|
||||||
//otherwise just launches the Transporter
|
//otherwise just launches the Transporter
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (psTransporter->droidType != DROID_TRANSPORTER)
|
if (psTransporter->droidType != DROID_TRANSPORTER && psTransporter->droidType != DROID_SUPERTRANSPORTER)
|
||||||
{
|
{
|
||||||
ASSERT( false, "launchTransporter: Invalid Transporter Droid" );
|
ASSERT( false, "Invalid Transporter Droid" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1591,7 +1585,7 @@ have arrived - returns true when there*/
|
||||||
bool updateTransporter(DROID *psTransporter)
|
bool updateTransporter(DROID *psTransporter)
|
||||||
{
|
{
|
||||||
ASSERT_OR_RETURN(true, psTransporter != NULL, "Invalid droid pointer");
|
ASSERT_OR_RETURN(true, psTransporter != NULL, "Invalid droid pointer");
|
||||||
ASSERT_OR_RETURN(true, psTransporter->droidType == DROID_TRANSPORTER, "Invalid droid type");
|
ASSERT_OR_RETURN(true, (psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER), "Invalid droid type");
|
||||||
|
|
||||||
//if not moving to mission site, exit
|
//if not moving to mission site, exit
|
||||||
if ( psTransporter->action != DACTION_TRANSPORTOUT &&
|
if ( psTransporter->action != DACTION_TRANSPORTOUT &&
|
||||||
|
@ -1804,10 +1798,8 @@ void resetTransporter()
|
||||||
/*checks the order of the droid to see if its currently flying*/
|
/*checks the order of the droid to see if its currently flying*/
|
||||||
bool transporterFlying(DROID *psTransporter)
|
bool transporterFlying(DROID *psTransporter)
|
||||||
{
|
{
|
||||||
ASSERT( psTransporter != NULL,
|
ASSERT (psTransporter != NULL, "Invalid droid pointer");
|
||||||
"transporterFlying: Invalid droid pointer" );
|
ASSERT ((psTransporter->droidType == DROID_TRANSPORTER || psTransporter->droidType == DROID_SUPERTRANSPORTER), "Droid is not a Transporter");
|
||||||
ASSERT( psTransporter->droidType == DROID_TRANSPORTER,
|
|
||||||
"transporterFlying: Droid is not a Transporter" );
|
|
||||||
|
|
||||||
return psTransporter->order.type == DORDER_TRANSPORTOUT ||
|
return psTransporter->order.type == DORDER_TRANSPORTOUT ||
|
||||||
psTransporter->order.type == DORDER_TRANSPORTIN ||
|
psTransporter->order.type == DORDER_TRANSPORTIN ||
|
||||||
|
|
Loading…
Reference in New Issue