Small cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2858 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
dadf2ffc00
commit
d82cd8172b
19
src/droid.c
19
src/droid.c
|
@ -524,36 +524,17 @@ void removeDroidBase(DROID *psDel)
|
|||
psDel->psGroup = NULL;
|
||||
}
|
||||
|
||||
//PUT THIS IN removeDroidFX()
|
||||
//once a droid is destroyed - it leaves a wrecked droid FEATURE in its place
|
||||
// buildFeature((asFeatureStats + droidFeature), psDel->x, psDel->y);
|
||||
//if( (psDel->droidType == DROID_PERSON || psDel->droidType == DROID_CYBORG) &&
|
||||
// (psDel->order != DORDER_RUNBURN) )
|
||||
//{
|
||||
// /* blow person up into blood and guts */
|
||||
// compPersonToBits(psDel);
|
||||
//}
|
||||
|
||||
/* Put Deliv. Pts back into world when a command droid dies */
|
||||
if(psDel->droidType == DROID_COMMAND)
|
||||
{
|
||||
|
||||
for (psStruct = apsStructLists[psDel->player]; psStruct; psStruct=psStruct->psNext)
|
||||
{
|
||||
/* Replace the delivery points for the factories assigned to this command droid */
|
||||
// if ( psStruct->pStructureType->type == REF_FACTORY ) /* Is it a factory? */
|
||||
// {
|
||||
// assignFactoryCommandDroid(psStruct, NULL); /* Return d. pt. */
|
||||
// }
|
||||
|
||||
// alexl's stab at a right answer.
|
||||
if (StructIsFactory(psStruct)
|
||||
&& psStruct->pFunctionality->factory.psCommander == psDel)
|
||||
{
|
||||
assignFactoryCommandDroid(psStruct, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ FEATURE_STATS *asFeatureStats;
|
|||
UDWORD numFeatureStats;
|
||||
|
||||
//Value is stored for easy access to this feature in destroyDroid()/destroyStruct()
|
||||
UDWORD structFeature;
|
||||
UDWORD oilResFeature;
|
||||
|
||||
/* other house droid to add */
|
||||
|
@ -81,7 +80,6 @@ void featureInitVars(void)
|
|||
{
|
||||
asFeatureStats = NULL;
|
||||
numFeatureStats = 0;
|
||||
structFeature = 0;
|
||||
oilResFeature = 0;
|
||||
}
|
||||
|
||||
|
@ -201,14 +199,8 @@ BOOL loadFeatureStats(const char *pFeatureData, UDWORD bufferSize)
|
|||
//determine the feature type
|
||||
featureType(psFeature, type);
|
||||
|
||||
//need to know which is the wrecked droid and wrecked structure for later use
|
||||
//the last stat of each type is used
|
||||
if (psFeature->subType == FEAT_BUILD_WRECK)
|
||||
{
|
||||
structFeature = i;
|
||||
}
|
||||
//and the oil resource - assumes only one!
|
||||
else if (psFeature->subType == FEAT_OIL_RESOURCE)
|
||||
if (psFeature->subType == FEAT_OIL_RESOURCE)
|
||||
{
|
||||
oilResFeature = i;
|
||||
}
|
||||
|
@ -623,27 +615,6 @@ void removeFeature(FEATURE *psDel)
|
|||
gridRemoveObject((BASE_OBJECT *)psDel);
|
||||
|
||||
killFeature(psDel);
|
||||
|
||||
|
||||
//once a feature of type FEAT_BUILDING is destroyed - it leaves a wrecked
|
||||
//struct FEATURE in its place - ?!
|
||||
if (psDel->psStats->subType == FEAT_BUILDING)
|
||||
{
|
||||
mapX = map_coord(psDel->x - psDel->psStats->baseWidth * TILE_UNITS / 2);
|
||||
mapY = map_coord(psDel->y - psDel->psStats->baseBreadth * TILE_UNITS / 2);
|
||||
/*for (width = 0; width < psDel->psStats->baseWidth; width++)
|
||||
{
|
||||
for (breadth = 0; breadth < psDel->psStats->baseBreadth; breadth++)
|
||||
{
|
||||
buildFeature((asFeatureStats + structFeature),
|
||||
world_coord(mapX + width), world_coord(mapY + breadth), FALSE);
|
||||
}
|
||||
}*/
|
||||
|
||||
// buildFeature((asFeatureStats + structFeature), world_coord(mapX),
|
||||
// world_coord(mapY), FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Remove a Feature and free it's memory */
|
||||
|
|
|
@ -36,8 +36,6 @@ extern FEATURE_STATS *asFeatureStats;
|
|||
extern UDWORD numFeatureStats;
|
||||
|
||||
//Value is stored for easy access to this feature in destroyDroid()/destroyStruct()
|
||||
//extern UDWORD droidFeature;
|
||||
extern UDWORD structFeature;
|
||||
extern UDWORD oilResFeature;
|
||||
|
||||
/* Load the feature stats */
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
#define PROJ_NAYBOR_RANGE (TILE_UNITS*4)
|
||||
|
||||
// Watermelon:neighbour global info ripped from droid.c
|
||||
PROJ_NAYBOR_INFO asProjNaybors[MAX_NAYBORS];
|
||||
UDWORD numProjNaybors=0;
|
||||
static PROJ_NAYBOR_INFO asProjNaybors[MAX_NAYBORS];
|
||||
static UDWORD numProjNaybors = 0;
|
||||
|
||||
static BASE_OBJECT *CurrentProjNaybors = NULL;
|
||||
static UDWORD projnayborTime = 0;
|
||||
|
|
Loading…
Reference in New Issue