From 34b1ca108f8ec35b4bd1ef57d1fea9dfec037da3 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Mon, 28 May 2007 21:44:52 +0000 Subject: [PATCH] Cleanup. Fix indentation. Use enum on structure types to help prevent bugs like the satlink bug from creeping back in. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1736 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/action.c | 94 --------------------------------- src/ai.c | 2 + src/component.c | 6 --- src/game.c | 18 ++++--- src/hci.c | 2 + src/intdisplay.c | 128 ++++++++++++++++++++------------------------- src/mission.c | 2 + src/scriptai.c | 3 +- src/structure.c | 34 ++++++------ src/structuredef.h | 43 ++------------- 10 files changed, 97 insertions(+), 235 deletions(-) diff --git a/src/action.c b/src/action.c index bae6aeef0..378887d16 100644 --- a/src/action.c +++ b/src/action.c @@ -236,78 +236,6 @@ BOOL actionInsideMinRange(DROID *psDroid, BASE_OBJECT *psObj, int weapon_slot) } - -/* Find a new location by a structure when building */ -/*static BOOL actionNewBuildPos(DROID *psDroid, UDWORD *pX, UDWORD *pY) -{ - //STRUCTURE_STATS *psStructStats; - BASE_STATS *psStats; - - // get the structure stats - switch (psDroid->action) - { - case DACTION_MOVETOBUILD: - case DACTION_FOUNDATION_WANDER: - if ( psDroid->order == DORDER_BUILD || psDroid->order == DORDER_LINEBUILD ) - { - //psStructStats = (STRUCTURE_STATS *)psDroid->psTarStats; - psStats = psDroid->psTarStats; - } - else - { - ASSERT( psDroid->order == DORDER_HELPBUILD, - "actionNewBuildPos: invalid order" ); - //psStructStats = ((STRUCTURE *)psDroid->psTarget)->pStructureType; - psStats = (BASE_STATS *)((STRUCTURE *)psDroid->psTarget)->pStructureType; - } - break; - case DACTION_BUILD: - case DACTION_BUILDWANDER: - case DACTION_MOVETODEMOLISH: - //case DACTION_MOVETOREPAIR: - case DACTION_MOVETORESTORE: - //psStructStats = ((STRUCTURE *)psDroid->psTarget)->pStructureType; - psStats = (BASE_STATS *)((STRUCTURE *)psDroid->psTarget)->pStructureType; - break; - case DACTION_MOVETOREPAIR: - case DACTION_MOVETOREARM: - psStats = (BASE_STATS *)((STRUCTURE *)psDroid->psActionTarget)->pStructureType; - break; - case DACTION_MOVETOCLEAR: - psStats = (BASE_STATS *)((FEATURE *)psDroid->psTarget)->psStats; - break; - default: - ASSERT( FALSE, - "actionNewBuildPos: invalid action" ); - return FALSE; - break; - } - //ASSERT( psStructStats != NULL, - // "actionNewBuildPos: invalid structure stats pointer" ); - - // find a new destination - //if (getDroidDestination(psStructStats, psDroid->orderX, psDroid->orderY,pX,pY)) - if (psDroid->action == DACTION_MOVETOREARM || psDroid->action == DACTION_MOVETOREPAIR) - { - //use action target - if (getDroidDestination(psStats, psDroid->actionX, psDroid->actionY, pX, pY)) - { - return TRUE; - } - } - else - { - //use order target - if (getDroidDestination(psStats, psDroid->orderX, psDroid->orderY, pX, pY)) - { - return TRUE; - } - } - - return FALSE; -}*/ - - // Realign turret void actionAlignTurret(BASE_OBJECT *psObj, int weapon_slot) { @@ -1991,25 +1919,6 @@ void actionUpdateDroid(DROID *psDroid) (SDWORD)psDroid->orderX,(SDWORD)psDroid->orderY, psDroid->psTarStats[0])) { moveStopDroid(psDroid); -/* xdiff = (SDWORD)psDroid->x - (SDWORD)psDroid->actionX; - ydiff = (SDWORD)psDroid->y - (SDWORD)psDroid->actionY; - if ( xdiff*xdiff + ydiff*ydiff >= TILE_UNITS*TILE_UNITS ) - { - debug( LOG_NEVER, "DACTION_MOVETOBUILD: new location\n"); - // Couldn't reach destination - try and find a new one - if (actionNewBuildPos(psDroid, &droidX,&droidY)) - { - psDroid->actionX = droidX; - psDroid->actionY = droidY; - moveDroidTo(psDroid, droidX,droidY); - } - else - { - debug( LOG_NEVER, "DACTION_MOVETOBUILD: giving up\n"); - psDroid->action = DACTION_NONE; - } - } - else*/ bDoHelpBuild = FALSE; // Got to destination - start building @@ -2020,8 +1929,6 @@ void actionUpdateDroid(DROID *psDroid) // calculate the top left of the structure tlx = (SDWORD)psDroid->orderX - (SDWORD)(psStructStats->baseWidth * TILE_UNITS)/2; tly = (SDWORD)psDroid->orderY - (SDWORD)(psStructStats->baseBreadth * TILE_UNITS)/2; -// tlx = tlx >> TILE_UNITS; -// tly = tly >> TILE_UNITS; //need to check if something has already started building here? //unless its a module! @@ -2061,7 +1968,6 @@ void actionUpdateDroid(DROID *psDroid) } } else if (!validLocation((BASE_STATS*)psDroid->psTarStats[0], -// psDroid->orderX >> TILE_SHIFT, psDroid->orderY >> TILE_SHIFT)) tlx >> TILE_SHIFT, tly >> TILE_SHIFT, psDroid->player, FALSE)) { debug( LOG_NEVER, "DACTION_MOVETOBUILD: !validLocation\n"); diff --git a/src/ai.c b/src/ai.c index c17c031af..69a262e86 100644 --- a/src/ai.c +++ b/src/ai.c @@ -372,6 +372,8 @@ static SDWORD targetAttackWeight(BASE_OBJECT *psTarget, BASE_OBJECT *psAttacker, case REF_REPAIR_FACILITY: targetTypeBonus = WEIGHT_MILITARY_STRUCT; break; + default: + break; } /* Now calculate the overall weight */ diff --git a/src/component.c b/src/component.c index d2aec2351..8d8f046d6 100644 --- a/src/component.c +++ b/src/component.c @@ -490,9 +490,6 @@ void displayStructureStatButton(STRUCTURE_STATS *Stats,UDWORD Player, Vector3i * //can only have the one if (Stats->psWeapStat[i] != NULL) { - /*nWeaponStat = Stats->defaultWeap; - weaponImd = Stats->asWeapList[nWeaponStat]->pIMD; - mountImd = Stats->asWeapList[nWeaponStat]->pMountGraphic;*/ weaponImd[i] = Stats->psWeapStat[i]->pIMD; mountImd[i] = Stats->psWeapStat[i]->pMountGraphic; } @@ -522,9 +519,6 @@ void displayStructureStatButton(STRUCTURE_STATS *Stats,UDWORD Player, Vector3i * { if (Stats->psWeapStat[0] != NULL) { - /*nWeaponStat = Stats->defaultWeap; - weaponImd = Stats->asWeapList[nWeaponStat]->pIMD; - mountImd = Stats->asWeapList[nWeaponStat]->pMountGraphic;*/ weaponImd[0] = Stats->psWeapStat[0]->pIMD; mountImd[0] = Stats->psWeapStat[0]->pMountGraphic; } diff --git a/src/game.c b/src/game.c index 8d8d48953..38e2f2980 100644 --- a/src/game.c +++ b/src/game.c @@ -6648,7 +6648,9 @@ BOOL loadSaveStructureV7(char *pFileData, UDWORD filesize, UDWORD numStructures) psRepair = ((REPAIR_FACILITY *)psStructure->pFunctionality); psRepair->psDeliveryPoint = NULL; psRepair->psObj = NULL; - psRepair->currentPtsAdded = 0; + psRepair->currentPtsAdded = 0; + break; + default: break; } } @@ -7081,6 +7083,8 @@ BOOL loadSaveStructureV19(char *pFileData, UDWORD filesize, UDWORD numStructures psRepair->psDeliveryPoint = NULL; } break; + default: + break; } //get the base body points psStructure->body = (UWORD)structureBody(psStructure); @@ -7152,7 +7156,7 @@ BOOL loadSaveStructureV(char *pFileData, UDWORD filesize, UDWORD numStructures, REPAIR_FACILITY *psRepair; REARM_PAD *psReArmPad; STRUCTURE_STATS *psStats = NULL; - STRUCTURE_STATS *psModule; + STRUCTURE_STATS *psModule; UDWORD capacity; UDWORD count, statInc; BOOL found; @@ -7162,8 +7166,6 @@ BOOL loadSaveStructureV(char *pFileData, UDWORD filesize, UDWORD numStructures, UDWORD sizeOfSaveStructure = 0; UDWORD researchId; - - if (version <= VERSION_20) { sizeOfSaveStructure = sizeof(SAVE_STRUCTURE_V20); @@ -7348,12 +7350,12 @@ BOOL loadSaveStructureV(char *pFileData, UDWORD filesize, UDWORD numStructures, switch (psStructure->pStructureType->type) { case REF_FACTORY: - case REF_VTOL_FACTORY: - case REF_CYBORG_FACTORY: + case REF_VTOL_FACTORY: + case REF_CYBORG_FACTORY: //if factory save the current build info psFactory = ((FACTORY *)psStructure->pFunctionality); psFactory->capacity = 0;//capacity reset during module build (UBYTE)psSaveStructure->capacity; - //this is set up during module build - if the stats have changed it will also set up with the latest value + //this is set up during module build - if the stats have changed it will also set up with the latest value //psFactory->productionOutput = (UBYTE)psSaveStructure->output; psFactory->quantity = (UBYTE)psSaveStructure->quantity; psFactory->timeStarted = psSaveStructure->droidTimeStarted; @@ -7521,6 +7523,8 @@ BOOL loadSaveStructureV(char *pFileData, UDWORD filesize, UDWORD numStructures, psReArmPad->timeStarted = 0; } break; + default: + break; } //get the base body points psStructure->body = (UWORD)structureBody(psStructure); diff --git a/src/hci.c b/src/hci.c index 4cf74cd8f..bdcf08170 100644 --- a/src/hci.c +++ b/src/hci.c @@ -7183,6 +7183,8 @@ void intCheckReticuleButtons(void) case REF_HQ: ReticuleEnabled[RETBUT_DESIGN].Enabled = TRUE; break; + default: + break; } } } diff --git a/src/intdisplay.c b/src/intdisplay.c index 4de14944c..714663fc0 100644 --- a/src/intdisplay.c +++ b/src/intdisplay.c @@ -916,8 +916,6 @@ void intDisplayStatusButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD Buffer->State = Form->state; -// Down = Form->state & (WCLICK_DOWN | WCLICK_LOCKED | WCLICK_CLICKLOCK); - Object = NULL; Image = -1; psObj = (BASE_OBJECT*)Buffer->Data; // Get the object associated with this widget. @@ -932,14 +930,12 @@ void intDisplayStatusButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD } if(psObj) { -// screenTextOut(64,48,"psObj: %p",psObj); switch (psObj->type) { case OBJ_DROID: // If it's a droid... Droid = (DROID*)psObj; if(DroidIsBuilding(Droid)) { Structure = DroidGetBuildStructure(Droid); -// DBPRINTF(("%p : %p",Droid,Structure)); if(Structure) { Object = Structure; //(void*)StructureGetIMD(Structure); IMDType = IMDTYPE_STRUCTURE; @@ -952,17 +948,14 @@ void intDisplayStatusButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD Player = selectedPlayer; IMDType = IMDTYPE_STRUCTURESTAT; RENDERBUTTON_INITIALISED(Buffer); - } else if (orderState(Droid, DORDER_DEMOLISH)) - { + } else if (orderState(Droid, DORDER_DEMOLISH)) { Stats = (BASE_STATS *)structGetDemolishStat(); ASSERT( Stats!=NULL,"intDisplayStatusButton : NULL Stats pointer." ); Object = (void*)Stats; Player = selectedPlayer; IMDType = IMDTYPE_STRUCTURESTAT; RENDERBUTTON_INITIALISED(Buffer); - } - else if (Droid->droidType == DROID_COMMAND) - { + } else if (Droid->droidType == DROID_COMMAND) { Structure = droidGetCommandFactory(Droid); if (Structure) { Object = Structure; @@ -974,11 +967,13 @@ void intDisplayStatusButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD case OBJ_STRUCTURE: // If it's a structure... Structure = (STRUCTURE*)psObj; - switch(Structure->pStructureType->type) { + switch(Structure->pStructureType->type) + { case REF_FACTORY: case REF_CYBORG_FACTORY: case REF_VTOL_FACTORY: - if(StructureIsManufacturing(Structure)) { + if (StructureIsManufacturing(Structure)) + { IMDType = IMDTYPE_DROIDTEMPLATE; Object = (void*)FactoryGetTemplate(StructureGetFactory(Structure)); RENDERBUTTON_INITIALISED(Buffer); @@ -991,70 +986,63 @@ void intDisplayStatusButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD break; case REF_RESEARCH: - if(StructureIsResearching(Structure)) { + if (StructureIsResearching(Structure)) + { Stats = (BASE_STATS*)Buffer->Data2; - if(Stats) { - /*StatGetResearchImage(Stats,&Image,(iIMDShape**)&Object,FALSE); - //if Object != NULL the there must be a IMD so set the object to - //equal the Research stat - if (Object != NULL) - { - Object = (void*)Stats; - } - IMDType = IMDTYPE_RESEARCH;*/ - if (((RESEARCH_FACILITY *)Structure-> - pFunctionality)->timeStartHold) + if (!Stats) + { + break; + } + if (((RESEARCH_FACILITY *)Structure->pFunctionality)->timeStartHold) { bOnHold = TRUE; } - StatGetResearchImage(Stats,&Image,(iIMDShape**)&Object, - &psResGraphic, FALSE); - if (psResGraphic) - { - //we have a Stat associated with this research topic - if (StatIsStructure(psResGraphic)) - { - //overwrite the Object pointer - Object = (void*)psResGraphic; - Player = selectedPlayer; - //this defines how the button is drawn - IMDType = IMDTYPE_STRUCTURESTAT; - } - else - { - compID = StatIsComponent(psResGraphic); - if (compID != COMP_UNKNOWN) - { - //this defines how the button is drawn - IMDType = IMDTYPE_COMPONENT; - //overwrite the Object pointer - Object = (void*)psResGraphic; - } - else - { - ASSERT( FALSE, - "intDisplayStatsButton:Invalid Stat for research button" ); - Object = NULL; - IMDType = IMDTYPE_RESEARCH; - } - } - } - else - { - //no Stat for this research topic so just use the graphic provided - //if Object != NULL the there must be a IMD so set the object to - //equal the Research stat - if (Object != NULL) - { - Object = (void*)Stats; - IMDType = IMDTYPE_RESEARCH; - } - } - RENDERBUTTON_INITIALISED(Buffer); + StatGetResearchImage(Stats,&Image,(iIMDShape**)&Object, &psResGraphic, FALSE); + if (psResGraphic) + { + // we have a Stat associated with this research topic + if (StatIsStructure(psResGraphic)) + { + // overwrite the Object pointer + Object = (void*)psResGraphic; + Player = selectedPlayer; + // this defines how the button is drawn + IMDType = IMDTYPE_STRUCTURESTAT; + } + else + { + compID = StatIsComponent(psResGraphic); + if (compID != COMP_UNKNOWN) + { + // this defines how the button is drawn + IMDType = IMDTYPE_COMPONENT; + // overwrite the Object pointer + Object = (void*)psResGraphic; + } + else + { + ASSERT(FALSE, "intDisplayStatsButton:Invalid Stat for research button"); + Object = NULL; + IMDType = IMDTYPE_RESEARCH; + } + } } -// Image = ResearchGetImage((RESEARCH_FACILITY*)Structure); + else + { + // no Stat for this research topic so just use the graphic provided + // if Object != NULL the there must be a IMD so set the object to + // equal the Research stat + if (Object != NULL) + { + Object = (void*)Stats; + IMDType = IMDTYPE_RESEARCH; + } + } + RENDERBUTTON_INITIALISED(Buffer); } break; + default: + break; } break; @@ -1081,10 +1069,6 @@ void intDisplayStatusButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD } else { RenderBlankToButton(Buffer,Down,TOPBUTTON); } - - - -// RENDERBUTTON_INITIALISED(Buffer); } CloseButtonRender(); diff --git a/src/mission.c b/src/mission.c index 848c57e89..2e8a50403 100644 --- a/src/mission.c +++ b/src/mission.c @@ -2078,6 +2078,8 @@ void aiUpdateMissionStructure(STRUCTURE *psStructure) } break; } + default: + break; } if (pSubject != NULL) diff --git a/src/scriptai.c b/src/scriptai.c index 91a966675..1c136da3e 100644 --- a/src/scriptai.c +++ b/src/scriptai.c @@ -921,8 +921,7 @@ static UDWORD scrStructTargetMask(STRUCTURE *psStruct) //else if (psStats->numWeaps > 0) else if (psStats->psWeapStat != NULL) { - //psWStats = psStats->asWeapList[0]; - psWStats = psStats->psWeapStat[0]; + psWStats = psStats->psWeapStat[0]; if (!proj_Direct(psWStats)) { mask = SCR_ST_DEF_IDF; diff --git a/src/structure.c b/src/structure.c index 5feb1a6d7..8818a01be 100644 --- a/src/structure.c +++ b/src/structure.c @@ -790,13 +790,9 @@ BOOL loadStructureStats(char *pStructData, UDWORD bufferSize) &psStructure->buildPoints, &psStructure->height, &psStructure->armourValue, &psStructure->bodyPoints, &psStructure->repairSystem, &psStructure->powerToBuild, - //&psStructure->minimumPower, &psStructure->resistance, &dummyVal, &psStructure->resistance, - //&psStructure->quantityLimit, &psStructure->sizeModifier, &dummyVal, &psStructure->sizeModifier, - //&ecmType, &sensorType, &psStructure->weaponSlots, &GfxFile, ecmType, sensorType, &weapSlots, GfxFile, - //&baseIMD, &psStructure->numFuncs, &psStructure->numWeaps); baseIMD, &psStructure->numFuncs, &numWeaps); #if MAX_PLAYERS != 4 && MAX_PLAYERS != 8 @@ -3425,8 +3421,10 @@ static void aiUpdateStructure(STRUCTURE *psStructure) psReArmPad->currentPtsAdded = 0; } } + break; } - break; + default: + break; } /* check subject stats (for research or manufacture) */ @@ -4464,6 +4462,11 @@ BOOL validLocation(BASE_STATS *psStats, UDWORD x, UDWORD y, UDWORD player, switch(psBuilding->type) { + case NUM_DIFF_BUILDINGS: + case REF_DEMOLISH: + case REF_BRIDGE: + ASSERT(FALSE, "validLocation: Bad structure type %u", psBuilding->type); + break; case REF_HQ: case REF_FACTORY: case REF_LAB: @@ -4714,10 +4717,6 @@ BOOL validLocation(BASE_STATS *psStats, UDWORD x, UDWORD y, UDWORD player, } } break; - - default: - valid = TRUE; - break; } //if setting up a build queue need to check against future sites as well - AB 4/5/99 if (ctrlShiftDown() && player == selectedPlayer && bCheckBuildQueue) @@ -5465,6 +5464,8 @@ BOOL structureIdle(STRUCTURE *psBuilding) pSubject = ((FACTORY*)psBuilding->pFunctionality)->psSubject; break; } + default: + break; } if (pSubject != NULL) @@ -7926,7 +7927,8 @@ STRUCTURE * giftSingleStructure(STRUCTURE *psStructure, UBYTE attackPlayer, BOOL case REF_VTOL_FACTORY: capacity = ((FACTORY *)psStructure->pFunctionality)->capacity; break; - //no default case cos don't care! + default: + break; } } //get rid of the structure @@ -7960,6 +7962,8 @@ STRUCTURE * giftSingleStructure(STRUCTURE *psStructure, UBYTE attackPlayer, BOOL capacity--; } break; + default: + break; } } if (buildPoints) @@ -8111,7 +8115,8 @@ UDWORD structPowerToBuild(STRUCTURE *psStruct) case REF_VTOL_FACTORY: capacity = ((FACTORY *)psStruct->pFunctionality)->capacity; break; - //no default case cos don't care! + default: + break; } if (capacity) { @@ -8171,11 +8176,8 @@ void resetResistanceLag(STRUCTURE *psBuilding) } } } - /* - case REF_REPAIR_FACILITY: - this is catered for in the aiUpdateStructure function - case REF_REARM_PAD: - this structure is taken over completely - */ - //default: //do nothing + default: //do nothing + break; } } } diff --git a/src/structuredef.h b/src/structuredef.h index 48c410e0e..14dcf6d7a 100644 --- a/src/structuredef.h +++ b/src/structuredef.h @@ -37,7 +37,7 @@ #define REF_ANY 255 // Used to indicate any kind of building when calling intGotoNextStructureType() /* Defines for indexing an appropriate IMD object given a buildings purpose. */ -enum +typedef enum _structure_type { REF_HQ, REF_FACTORY, @@ -53,7 +53,7 @@ REF_RESEARCH, REF_RESEARCH_MODULE, REF_REPAIR_FACILITY, REF_COMMAND_CONTROL, //control centre for command droids -REF_BRIDGE, +REF_BRIDGE, //NOT USED, but removing it would change savegames REF_DEMOLISH, //the demolish structure type - should only be one stat with this type REF_CYBORG_FACTORY, REF_VTOL_FACTORY, @@ -61,29 +61,8 @@ REF_LAB, REF_REARM_PAD, REF_MISSILE_SILO, REF_SAT_UPLINK, //added for updates - AB 8/6/99 - -//REF_WALLH, //the following are needed for the demo -//REF_WALLV, -//REF_CORNER1, -//REF_CORNER2, -//REF_CORNER3, -//REF_CORNER4, -//REF_GATE1, -//REF_GATE2, -//REF_GATE3, -//REF_GATE4, -//REF_TOWER1, -//REF_TOWER2, -//REF_TOWER3, -//REF_TOWER4, -//REF_VANH, -//REF_VANV, -//REF_JEEP, -//REF_TANKERH, -//REF_TANKERV, - NUM_DIFF_BUILDINGS, //need to keep a count of how many types for IMD loading -}; +} STRUCTURE_TYPE; typedef enum _position_type { @@ -151,7 +130,7 @@ typedef UWORD STRUCTSTRENGTH_MODIFIER; typedef struct _structure_stats { STATS_BASE; /* basic stats */ - UDWORD type; /* the type of structure */ + STRUCTURE_TYPE type; /* the type of structure */ TECH_LEVEL techLevel; /* technology level of the structure */ STRUCT_STRENGTH strength; /* strength against the weapon effects */ UDWORD terrainType; /*The type of terrain the structure has to be @@ -171,15 +150,9 @@ typedef struct _structure_stats points until fully restored . The points are then added to the Armour Points*/ UDWORD powerToBuild; /*How much power the structure requires to build*/ - //NOT USED ANYMORE - AB 24/01/99 - /*UDWORD minimumPower; The minimum power requirement to start building - the structure*/ UDWORD resistance; /*The number used to determine whether a structure can resist an enemy takeover - 0 = cannot be attacked electrically*/ - //NOT USED ANYMORE - AB 24/01/99 - /*UDWORD quantityLimit; The maximum number that a player can have - - 0 = no limit 1 = only 1 allowed etc*/ UDWORD sizeModifier; /*The larger the target, the easier to hit*/ struct iIMDShape *pIMD; /*The IMD to draw for this structure */ struct iIMDShape *pBaseIMD; /*The base IMD to draw for this structure */ @@ -187,17 +160,11 @@ typedef struct _structure_stats if any*/ struct _sensor_stats *pSensor; /*Which Sensor is standard for the structure - if any*/ - //NOT USED ANYMORE - AB 24/01/99 - //Watermelon:pfft UDWORD weaponSlots; /*Number of weapons that can be attached to the building*/ UDWORD numWeaps; /*Number of weapons for default */ - //SDWORD defaultWeap; /The default weapon/ - //struct _weapon_stats **asWeapList; /*List of pointers to default weapons*/ - - //Watermelon:can only have STRUCT_MAXWEAPS now... - struct _weapon_stats *psWeapStat[STRUCT_MAXWEAPS]; //can only have one weapon now + struct _weapon_stats *psWeapStat[STRUCT_MAXWEAPS]; UDWORD numFuncs; /*Number of functions for default*/ SDWORD defaultFunc; /*The default function*/