Permalink
Browse files

Create new droid type, DROID_SUPERTRANSPORTER.

fixes ticket:3196
  • Loading branch information...
1 parent c91f51a commit fcede64e428e46657db2ef7b0f7bd1ce26b1d91d @vexed vexed committed Feb 26, 2012
@@ -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-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
-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
Dragon-Hover-SeraphGauss,748,Body14SUP,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,hover01,ZNULLREPAIR,DROID,DefaultSensor1Mk1,2
View
@@ -406,7 +406,7 @@ bool actionTargetTurret(BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, WEAPON *
{
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_CYBORG_SUPER)
{
@@ -2220,7 +2220,7 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction)
// can't attack without a weapon
// or yourself
if ((psDroid->asWeaps[0].nStat == 0) ||
- (psDroid->droidType == DROID_TRANSPORTER) ||
+ (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) ||
(psAction->psObj == psDroid))
{
break;
@@ -2241,7 +2241,7 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction)
//in multiPlayer cannot electronically attack a tranporter
if (bMultiPlayer
&& 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;
break;
View
@@ -353,6 +353,7 @@ static SDWORD targetAttackWeight(BASE_OBJECT *psTarget, BASE_OBJECT *psAttacker,
case DROID_ECM:
case DROID_PERSON:
case DROID_TRANSPORTER:
+ case DROID_SUPERTRANSPORTER:
case DROID_DEFAULT:
case DROID_ANY:
break;
@@ -579,7 +580,7 @@ int aiBestNearestTarget(DROID *psDroid, BASE_OBJECT **ppsObj, int weapon_slot, i
// if not electronic then valid target
if (!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
psTarget = targetInQuestion;
View
@@ -673,6 +673,7 @@ static void displayCompObj(DROID *psDroid, bool bButton)
{
case DROID_DEFAULT:
case DROID_TRANSPORTER:
+ case DROID_SUPERTRANSPORTER:
case DROID_CYBORG:
case DROID_CYBORG_SUPER:
case DROID_WEAPON:
@@ -1002,7 +1003,7 @@ void displayComponentObject(DROID *psDroid)
position.z = -(st.pos.y - player.p.z);
position.y = st.pos.z;
- if(psDroid->droidType == DROID_TRANSPORTER)
+ if(psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
{
position.y += bobTransporterHeight();
}
View
@@ -889,6 +889,7 @@ void desSetupDesignTemplates(void)
* cyborg, person or command droid,
*/
if (psTempl->droidType != DROID_TRANSPORTER &&
+ psTempl->droidType != DROID_SUPERTRANSPORTER &&
psTempl->droidType != DROID_CYBORG &&
psTempl->droidType != DROID_CYBORG_SUPER &&
psTempl->droidType != DROID_CYBORG_CONSTRUCT &&
@@ -1302,6 +1303,11 @@ const char *GetDefaultTemplateName(DROID_TEMPLATE *psTemplate)
sstrcpy(aCurrName, _("Transport"));
return aCurrName;
}
+ if(psTemplate->droidType == DROID_SUPERTRANSPORTER)
+ {
+ sstrcpy(aCurrName, _("Super Transport"));
+ return aCurrName;
+ }
/*
Now get the normal default droid name based on its components
View
@@ -81,7 +81,7 @@
struct _dragBox dragBox3D,wallDrag;
-#define POSSIBLE_SELECTIONS 13
+#define POSSIBLE_SELECTIONS 14
#define POSSIBLE_TARGETS 23
extern char DROIDDOING[512]; // holds the string on what the droid is doing
@@ -779,7 +779,7 @@ void processMouseClickInput(void)
}
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!
ASSERT(game.type == CAMPAIGN, "Game type was set incorrectly!");
@@ -1012,7 +1012,7 @@ void processMouseClickInput(void)
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)
{
// Alt+move = disembark transporter
@@ -1705,7 +1705,7 @@ static void dealWithLMBDroid(DROID* psDroid, SELECTION_TYPE selection)
FeedbackOrderGiven();
driveDisableTactical();
}
- else if (psDroid->droidType == DROID_TRANSPORTER)
+ else if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
{
if (selection == SC_INVALID)
{
@@ -2358,7 +2358,7 @@ static void dealWithRMB( void )
dealWithDroidSelect(psDroid, false);
}
// Not a transporter
- else if (psDroid->droidType != DROID_TRANSPORTER)
+ else if (psDroid->droidType != DROID_TRANSPORTER && psDroid->droidType != DROID_SUPERTRANSPORTER)
{
if (bRightClickOrders)
{
@@ -2567,7 +2567,7 @@ static void dealWithRMB( void )
{
if (psDroid->selected)
{
- if (psDroid->droidType == DROID_TRANSPORTER)
+ if (psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER)
{
orderDroidLoc(psDroid, DORDER_DISEMBARK, mouseTileX *
TILE_UNITS + TILE_UNITS/2, mouseTileY * TILE_UNITS +
@@ -2653,7 +2653,7 @@ STRUCTURE *psStructure;
retVal = MT_SENSOR;
}
}
- else if (psDroid->droidType == DROID_TRANSPORTER &&
+ else if ((psDroid->droidType == DROID_TRANSPORTER || psDroid->droidType == DROID_SUPERTRANSPORTER) &&
selectedPlayer == psDroid->player)
{
//check the transporter is not full
@@ -2836,7 +2836,7 @@ STRUCTURE *psStructure;
// enum in DroidDef.h
//
//#define NUM_DROID_WEIGHTS (10)
-#define NUM_DROID_WEIGHTS (13)
+#define NUM_DROID_WEIGHTS (14)
UBYTE DroidSelectionWeights[NUM_DROID_WEIGHTS] = {
3, //DROID_WEAPON,
1, //DROID_SENSOR,
@@ -2845,6 +2845,7 @@ UBYTE DroidSelectionWeights[NUM_DROID_WEIGHTS] = {
3, //DROID_PERSON,
3, //DROID_CYBORG,
9, //DROID_TRANSPORTER,
+ 10, //DROID_SUPERTRANSPORTER
0, //DROID_COMMAND,
4, //DROID_REPAIR,
5, //DROID_DEFAULT,
@@ -2943,6 +2944,7 @@ SELECTION_TYPE selectionClass;
selectionClass = SC_DROID_DIRECT;
break;
case DROID_TRANSPORTER:
+ case DROID_SUPERTRANSPORTER:
//can remove this is NEVER going to select the Transporter to move
//Never say Never!! cos here we go in multiPlayer!!
selectionClass = SC_DROID_TRANSPORTER;
View
@@ -130,6 +130,7 @@ SC_DROID_RECOVERY,
SC_DROID_COMMAND,
SC_DROID_BOMBER,
SC_DROID_TRANSPORTER,
+SC_DROID_SUPERTRANSPORTER,
SC_DROID_DEMOLISH,
SC_DROID_REPAIR,
SC_INVALID,
View
@@ -2727,7 +2727,7 @@ void renderShadow( DROID *psDroid, iIMDShape *psShadowIMD )
Vector3i dv;
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;
}
@@ -3596,7 +3596,7 @@ void calcScreenCoords(DROID *psDroid)
const int cZ = pie_RotateProject(&origin, &center);
// 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;
}
@@ -3618,7 +3618,7 @@ void calcScreenCoords(DROID *psDroid)
{
//don't allow Transporter Droids to be selected here
//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);
}
Oops, something went wrong.

0 comments on commit fcede64

Please sign in to comment.