Index: src/action.c
===================================================================
--- src/action.c	(revision 6043)
+++ src/action.c	(working copy)
@@ -315,12 +315,12 @@
 	switch (psObj->type)
 	{
 	case OBJ_DROID:
-		tRot = ((DROID *)psObj)->turretRotation[weapon_slot];
-		tPitch = ((DROID *)psObj)->turretPitch[weapon_slot];
+		tRot = ((DROID *)psObj)->asWeaps[weapon_slot].rotation;
+		tPitch = ((DROID *)psObj)->asWeaps[weapon_slot].pitch;
 		break;
 	case OBJ_STRUCTURE:
-		tRot = ((STRUCTURE *)psObj)->turretRotation[weapon_slot];
-		tPitch = ((STRUCTURE *)psObj)->turretPitch[weapon_slot];
+		tRot = ((STRUCTURE *)psObj)->asWeaps[weapon_slot].rotation;
+		tPitch = ((STRUCTURE *)psObj)->asWeaps[weapon_slot].pitch;
 
 		// now find the nearest 90 degree angle
 		nearest = (UWORD)(((tRot + 45) / 90) * 90);
@@ -388,15 +388,15 @@
 	switch (psObj->type)
 	{
 	case OBJ_DROID:
-		((DROID *)psObj)->turretRotation[weapon_slot] = tRot;
-		((DROID *)psObj)->turretPitch[weapon_slot] = tPitch;
+		((DROID *)psObj)->asWeaps[weapon_slot].rotation = tRot;
+		((DROID *)psObj)->asWeaps[weapon_slot].pitch = tPitch;
 		break;
 	case OBJ_STRUCTURE:
 		// now adjust back to the nearest 90 degree angle
 		tRot = (UWORD)((tRot + nearest) % 360);
 
-		((STRUCTURE *)psObj)->turretRotation[weapon_slot] = tRot;
-		((STRUCTURE *)psObj)->turretPitch[weapon_slot] = tPitch;
+		((STRUCTURE *)psObj)->asWeaps[weapon_slot].rotation = tRot;
+		((STRUCTURE *)psObj)->asWeaps[weapon_slot].pitch = tPitch;
 		break;
 	default:
 		ASSERT(!"invalid object type", "actionAlignTurret: invalid object type");
@@ -406,9 +406,9 @@
 }
 
 /* returns true if on target */
-BOOL actionTargetTurret(BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, UWORD *pRotation,
-		UWORD *pPitch, WEAPON_STATS *psWeapStats, BOOL bInvert, int weapon_slot)
+BOOL actionTargetTurret(BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, WEAPON *psWeapon)
 {
+	WEAPON_STATS *psWeapStats = asWeaponStats + psWeapon->nStat;
 	SWORD  tRotation, tPitch, rotRate, pitchRate;
 	SDWORD  targetRotation,targetPitch;
 	SDWORD  pitchError;
@@ -416,49 +416,53 @@
 	BOOL	onTarget = false;
 	float	fR;
 	SDWORD	pitchLowerLimit, pitchUpperLimit;
-	DROID	*psDroid = NULL;
+	bool	bInvert = false;
+	bool	bRepair = false;
 
+	/* check whether turret position inverted vertically on body */
+	if (psAttacker->type == OBJ_DROID && !cyborgDroid((DROID *)psAttacker) && isVtolDroid((DROID *)psAttacker))
+	{
+		bInvert = true;
+	}
+
+	if (psAttacker->type == OBJ_DROID && ((DROID *)psAttacker)->droidType == DROID_REPAIR)
+	{
+		bRepair = true;
+	}
+
 	// these are constants now and can be set up at the start of the function
 	rotRate = ACTION_TURRET_ROTATION_RATE * 4;
 	pitchRate = ACTION_TURRET_ROTATION_RATE * 2;
 
-	if (psWeapStats)
+	// extra heavy weapons on some structures need to rotate and pitch more slowly
+	if (psWeapStats->weight > HEAVY_WEAPON_WEIGHT && !bRepair)
 	{
-		// extra heavy weapons on some structures need to rotate and pitch more slowly
-		if (psWeapStats->weight > HEAVY_WEAPON_WEIGHT)
-		{
-			UDWORD excess = 100 * (psWeapStats->weight - HEAVY_WEAPON_WEIGHT) / psWeapStats->weight;
+		UDWORD excess = 100 * (psWeapStats->weight - HEAVY_WEAPON_WEIGHT) / psWeapStats->weight;
 
-			rotRate = ACTION_TURRET_ROTATION_RATE * 2 - excess;
-			pitchRate = (SWORD) (rotRate / 2);
-		}
+		rotRate = ACTION_TURRET_ROTATION_RATE * 2 - excess;
+		pitchRate = (SWORD) (rotRate / 2);
 	}
 
-	tRotation = *pRotation;
-	tPitch = *pPitch;
+	tRotation = psWeapon->rotation;
+	tPitch = psWeapon->pitch;
 
 	//set the pitch limits based on the weapon stats of the attacker
 	pitchLowerLimit = pitchUpperLimit = 0;
 	if (psAttacker->type == OBJ_STRUCTURE)
 	{
-		pitchLowerLimit = asWeaponStats[((STRUCTURE *)psAttacker)->asWeaps[weapon_slot].
-			nStat].minElevation;
-		pitchUpperLimit = asWeaponStats[((STRUCTURE *)psAttacker)->asWeaps[weapon_slot].
-			nStat].maxElevation;
+		pitchLowerLimit = psWeapStats->minElevation;
+		pitchUpperLimit = psWeapStats->maxElevation;
 	}
 	else if (psAttacker->type == OBJ_DROID)
 	{
-		psDroid = (DROID *) psAttacker;
-		if ( (psDroid->droidType == DROID_WEAPON) ||
-			 (psDroid->droidType == DROID_TRANSPORTER) ||
-			 (psDroid->droidType == DROID_COMMAND) ||
-			 (psDroid->droidType == DROID_CYBORG) ||
-			 (psDroid->droidType == DROID_CYBORG_SUPER) )
+		DROID *psDroid = (DROID *)psAttacker;
+
+		if (psDroid->droidType == DROID_WEAPON || psDroid->droidType == DROID_TRANSPORTER
+		    || psDroid->droidType == DROID_COMMAND || psDroid->droidType == DROID_CYBORG
+		    || psDroid->droidType == DROID_CYBORG_SUPER)
 		{
-			pitchLowerLimit = asWeaponStats[psDroid->asWeaps[weapon_slot].
-				nStat].minElevation;
-			pitchUpperLimit = asWeaponStats[psDroid->asWeaps[weapon_slot].
-				nStat].maxElevation;
+			pitchLowerLimit = psWeapStats->minElevation;
+			pitchUpperLimit = psWeapStats->maxElevation;
 		}
 		else if ( psDroid->droidType == DROID_REPAIR )
 		{
@@ -539,7 +543,6 @@
 		{
 			tRotation = (SWORD)(targetRotation - psAttacker->direction);
 		}
-// 			debug( LOG_NEVER, "locked on target...\n");
 		onTarget = true;
 	}
 	tRotation %= 360;
@@ -559,18 +562,18 @@
 	}
 
 	/* set muzzle pitch if direct fire */
-	if (psWeapStats && (proj_Direct(psWeapStats) || ((psAttacker->type == OBJ_DROID) && !proj_Direct(psWeapStats) 
-	                                                  && actionInsideMinRange(psDroid, psTarget, psWeapStats))))
+	if (!bRepair && (proj_Direct(psWeapStats) || ((psAttacker->type == OBJ_DROID)
+                                                      && !proj_Direct(psWeapStats) 
+	                                              && actionInsideMinRange((DROID *)psAttacker, psTarget, psWeapStats))))
 	{
-		dx = psTarget->pos.x - psAttacker->pos.x;//muzzle.x;
-		dy = psTarget->pos.y - psAttacker->pos.y;//muzzle.y;
-		dz = psTarget->pos.z - psAttacker->pos.z;//muzzle.z;
+		dx = psTarget->pos.x - psAttacker->pos.x;
+		dy = psTarget->pos.y - psAttacker->pos.y;
+		dz = psTarget->pos.z - psAttacker->pos.z;
 
 		/* get target distance */
 		fR = trigIntSqrt( dx*dx + dy*dy );
 
 		targetPitch = (SDWORD)( RAD_TO_DEG(atan2(dz, fR)));
-		//tPitch = tPitch;
 		if (tPitch > 180)
 		{
 			tPitch -=360;
@@ -627,11 +630,9 @@
 		}
 	}
 
-	*pRotation = tRotation;
-	*pPitch = tPitch;
+	psWeapon->rotation = tRotation;
+	psWeapon->pitch = tPitch;
 
-// 	debug( LOG_NEVER, "endrot=%d\n",tRotation);
-
 	return onTarget;
 }
 
@@ -995,7 +996,7 @@
 	SDWORD				xdiff,ydiff, rangeSq;
 	SECONDARY_STATE			state;
 	PROPULSION_STATS	*psPropStats;
-	BOOL				bChaseBloke, bInvert;
+	BOOL				bChaseBloke;
 	FEATURE				*psNextWreck;
 	BOOL				(*actionUpdateFunc)(DROID *psDroid) = NULL;
 	SDWORD				moveAction;
@@ -1013,16 +1014,6 @@
 	psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
 	ASSERT(psPropStats != NULL, "invalid propulsion stats pointer");
 
-	/* check whether turret inverted for actionTargetTurret */
-	if (!cyborgDroid(psDroid) && psPropStats->propulsionType == PROPULSION_TYPE_LIFT)
-	{
-		bInvert = true;
-	}
-	else
-	{
-		bInvert = false;
-	}
-
 	// clear the target if it has died
 	for (i = 0; i < DROID_MAXWEAPS; i++)
 	{
@@ -1318,10 +1309,7 @@
 
 							if (validTarget((BASE_OBJECT *)psDroid, psActionTarget, j))
 							{
-								if (actionTargetTurret((BASE_OBJECT*)psDroid, psActionTarget,
-														&(psDroid->turretRotation[j]), &(psDroid->turretPitch[j]),
-														&asWeaponStats[psDroid->asWeaps[j].nStat],
-														bInvert,j))
+								if (actionTargetTurret((BASE_OBJECT*)psDroid, psActionTarget, &psDroid->asWeaps[j]))
 								{
 									// In range - fire !!!
 									combFire(&psDroid->asWeaps[j], (BASE_OBJECT *)psDroid,
@@ -1332,10 +1320,7 @@
 							{
 								if ((iVisible & 2) && validTarget((BASE_OBJECT *)psDroid, psDroid->psActionTarget[0], j))
 								{
-									if (actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-															&(psDroid->turretRotation[j]), &(psDroid->turretPitch[j]),
-															&asWeaponStats[psDroid->asWeaps[j].nStat],
-															bInvert,j))
+									if (actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[j]))
 									{
 										// In range - fire !!!
 										combFire(&psDroid->asWeaps[j], (BASE_OBJECT *)psDroid,
@@ -1431,10 +1416,7 @@
 						}
 					}
 					else if (!psWeapStats->rotate ||
-							actionTargetTurret((BASE_OBJECT*)psDroid, psActionTarget,
-												&(psDroid->turretRotation[i]), &(psDroid->turretPitch[i]),
-												&asWeaponStats[psDroid->asWeaps[i].nStat],
-												bInvert,i))
+							actionTargetTurret((BASE_OBJECT*)psDroid, psActionTarget, &psDroid->asWeaps[i]))
 					{
 						/* In range - fire !!! */
 						combFire(&psDroid->asWeaps[i], (BASE_OBJECT *)psDroid, psActionTarget, i);
@@ -1497,10 +1479,7 @@
 															VTOL_ATTACK_AUDIO_DELAY );
 							}
 
-							if (actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-													&(psDroid->turretRotation[i]), &(psDroid->turretPitch[i]),
-													&asWeaponStats[psDroid->asWeaps[i].nStat],
-													bInvert,i))
+							if (actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[i]))
 							{
 									// In range - fire !!!
 									combFire(&psDroid->asWeaps[i], (BASE_OBJECT *)psDroid,
@@ -1509,10 +1488,7 @@
 						}
 						else
 						{
-							actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-													&(psDroid->turretRotation[i]), &(psDroid->turretPitch[i]),
-													&asWeaponStats[psDroid->asWeaps[i].nStat],
-													bInvert,i);
+							actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[i]);
 						}
 					}
 				}
@@ -1604,10 +1580,7 @@
 						psWeapStats = asWeaponStats + psDroid->asWeaps[i].nStat;
 						if (psWeapStats->rotate)
 						{
-							actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-													&(psDroid->turretRotation[i]), &(psDroid->turretPitch[i]),
-													&asWeaponStats[psDroid->asWeaps[i].nStat],
-													bInvert,i);
+							actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[i]);
 						}
 
 						bChaseBloke = false;
@@ -1661,8 +1634,8 @@
 			{
 				for(i = 0;i < psDroid->numWeaps;i++)
 				{
-					if ((psDroid->turretRotation[i] != 0) ||
-						(psDroid->turretPitch[i] != 0))
+					if ((psDroid->asWeaps[i].rotation != 0) ||
+						(psDroid->asWeaps[i].pitch != 0))
 					{
 						actionAlignTurret((BASE_OBJECT *)psDroid, i);
 					}
@@ -1935,9 +1908,7 @@
 				moveTurnDroid(psDroid,psDroid->psTarget->pos.x,psDroid->psTarget->pos.y);
 			}*/
 			// Watermelon:make construct droid to use turretRotation[0]
-			actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-									&(psDroid->turretRotation[0]), &(psDroid->turretPitch[0]),
-									NULL,false,0);
+			actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]);
 		}
 		break;
 	case DACTION_MOVETODEMOLISH:
@@ -2045,9 +2016,7 @@
 		else if ( actionUpdateFunc(psDroid) )
 		{
 			//Watermelon:use 0 for non-combat(only 1 'weapon')
-			actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-									&(psDroid->turretRotation[0]), &(psDroid->turretPitch[0]),
-									NULL,false,0);
+			actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]);
 		}
 		else if (psDroid->action == DACTION_CLEARWRECK)
 		{
@@ -2144,9 +2113,7 @@
 		break;
 	case DACTION_OBSERVE:
 		// align the turret
-		actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-						&(psDroid->turretRotation[0]), &(psDroid->turretPitch[0]),
-						NULL,false,0);
+		actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]);
 
 		if (cbSensorDroid(psDroid))
 		{
@@ -2172,9 +2139,7 @@
 		break;
 	case DACTION_MOVETOOBSERVE:
 		// align the turret
-		actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0],
-						&(psDroid->turretRotation[0]), &(psDroid->turretPitch[0]),
-						NULL,false,0);
+		actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]);
 
 		if (visibleObject((BASE_OBJECT *)psDroid, psDroid->psActionTarget[0], false))
 		{
@@ -2268,9 +2233,7 @@
 			// Got to destination - start repair
 			//rotate turret to point at droid being repaired
 			//Watermelon:use 0 for repair droid
-			if (actionTargetTurret((BASE_OBJECT*)psDroid,
-					psDroid->psActionTarget[0], &(psDroid->turretRotation[0]),
-					&(psDroid->turretPitch[0]), NULL, false, 0))
+			if (actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]))
 			{
 				if (droidStartDroidRepair(psDroid))
 				{
@@ -2295,9 +2258,7 @@
 		//Watermelon:use 0 for repair droid
 		if (psDroid->psActionTarget[0] != (BASE_OBJECT *)psDroid)
 		{
-			actionTargetTurret((BASE_OBJECT*)psDroid,
-					psDroid->psActionTarget[0], &(psDroid->turretRotation[0]),
-					&(psDroid->turretPitch[0]), NULL, false, 0);
+			actionTargetTurret((BASE_OBJECT*)psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]);
 		}
 
 		//check still next to the damaged droid
@@ -2422,8 +2383,8 @@
 		//Watermelon:use 0 for all non-combat droid types
 		if (psDroid->numWeaps == 0)
 		{
-			if ((psDroid->turretRotation[0] != 0) ||
-				(psDroid->turretPitch[0] != 0))
+			if ((psDroid->asWeaps[0].rotation != 0) ||
+				(psDroid->asWeaps[0].pitch != 0))
 			{
 				actionAlignTurret((BASE_OBJECT *)psDroid, 0);
 			}
@@ -2432,8 +2393,8 @@
 		{
 			for (i = 0;i < psDroid->numWeaps;i++)
 			{
-				if ((psDroid->turretRotation[i] != 0) ||
-					(psDroid->turretPitch[i] != 0))
+				if ((psDroid->asWeaps[i].rotation != 0) ||
+					(psDroid->asWeaps[i].pitch != 0))
 				{
 					actionAlignTurret((BASE_OBJECT *)psDroid, i);
 				}
Index: src/action.h
===================================================================
--- src/action.h	(revision 6043)
+++ src/action.h	(working copy)
@@ -112,8 +112,7 @@
 					   BASE_OBJECT *psObj, UDWORD x, UDWORD y);
 
 /** Rotate turret toward  target return True if locked on (Droid and Structure). */
-BOOL actionTargetTurret(BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, UWORD *pRotation,
-		UWORD *pPitch, WEAPON_STATS *psWeapStats, BOOL bInvert, int weapon_slot);
+BOOL actionTargetTurret(BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, WEAPON *psWeapon);
 
 /** Realign turret. */
 extern void actionAlignTurret(BASE_OBJECT *psObj, int weapon_slot);
Index: src/structuredef.h
===================================================================
--- src/structuredef.h	(revision 6043)
+++ src/structuredef.h	(working copy)
@@ -270,9 +270,6 @@
 	/* The other structure data.  These are all derived from the functions
 	 * but stored here for easy access - will need to add more for variable stuff!
 	 */
-	//the sensor stats need to be stored since the actual sensor stat can change with research
-	UWORD		turretRotation[STRUCT_MAXWEAPS];				// weapon, ECM and sensor direction and pitch
-	UWORD		turretPitch[STRUCT_MAXWEAPS];				// weapon, ECM and sensor direction and pitch
 
 	FUNCTIONALITY	*pFunctionality;		/* pointer to structure that contains fields
 											   necessary for functionality */
Index: src/structure.c
===================================================================
--- src/structure.c	(revision 6043)
+++ src/structure.c	(working copy)
@@ -1633,8 +1633,8 @@
 		//set up the rest of the data
 		for (i = 0;i < STRUCT_MAXWEAPS;i++)
 		{
-			psBuilding->turretRotation[i] = 0;
-			psBuilding->turretPitch[i] = 0;
+			psBuilding->asWeaps[i].rotation = 0;
+			psBuilding->asWeaps[i].pitch = 0;
 			psBuilding->psTarget[i] = NULL;
 		}
 		psBuilding->targetted = 0;
@@ -2781,9 +2781,8 @@
 	//////
 	// - radar should rotate every three seconds ... 'cause we timed it at Heathrow !
 	// gameTime is in milliseconds - one rotation every 3 seconds = 1 rotation event 3000 millisecs
-			psStructure->turretRotation[0] = (UWORD)(((gameTime*360)/3000)%360);
-
-			psStructure->turretPitch[0] = 0;
+			psStructure->asWeaps[0].rotation = (UWORD)(((gameTime*360)/3000)%360);
+			psStructure->asWeaps[0].pitch = 0;
 		}
 	}
 
@@ -2843,14 +2842,11 @@
 					//if were going to shoot at something move the turret first then fire when locked on
 					if (psWStats->pMountGraphic == NULL)//no turret so lock on whatever
 					{
-						psStructure->turretRotation[i] = (UWORD)calcDirection(psStructure->pos.x,
+						psStructure->asWeaps[i].rotation = (UWORD)calcDirection(psStructure->pos.x,
 							psStructure->pos.y, psChosenObjs[i]->pos.x, psChosenObjs[i]->pos.y);
 						combFire(&psStructure->asWeaps[i], (BASE_OBJECT *)psStructure, psChosenObjs[i], i);
 					}
-					else if(actionTargetTurret((BASE_OBJECT*)psStructure, psChosenObjs[i],
-											&(psStructure->turretRotation[i]),
-											&(psStructure->turretPitch[i]),
-											psWStats, false, i))
+					else if (actionTargetTurret((BASE_OBJECT*)psStructure, psChosenObjs[i], &psStructure->asWeaps[i]))
 					{
 						combFire(&psStructure->asWeaps[i], (BASE_OBJECT *)psStructure, psChosenObjs[i], i);
 					}
@@ -2858,8 +2854,7 @@
 				else
 				{
 					// realign the turret
-					if ( ((psStructure->turretRotation[i] % 90) != 0) ||
-						(psStructure->turretPitch[i] != 0) )
+					if ((psStructure->asWeaps[i].rotation % 90) != 0 || psStructure->asWeaps[i].pitch != 0)
 					{
 						actionAlignTurret((BASE_OBJECT *)psStructure, i);
 					}
@@ -3337,11 +3332,8 @@
 					"aiUpdateStructure: invalid droid pointer" );
 			psRepairFac = &psStructure->pFunctionality->repairFacility;
 
-			if ( psDroid->action == DACTION_WAITDURINGREPAIR &&
-				actionTargetTurret((BASE_OBJECT*)psStructure, psChosenObj,
-									&(psStructure->turretRotation[0]),
-									&(psStructure->turretPitch[0]),
-									NULL, false, 0))
+			if (psDroid->action == DACTION_WAITDURINGREPAIR
+			    && actionTargetTurret((BASE_OBJECT*)psStructure, psChosenObj, &psStructure->asWeaps[0]))
 			{
 				//check droid is not healthy
 				if (psDroid->body < psDroid->originalBody)
@@ -5436,8 +5428,8 @@
 					-psShape->connectors[weapon_slot].y);//note y and z flipped
 
 		//matrix = the gun and turret mount on the body
-		pie_MatRotY(DEG(psStructure->turretRotation[weapon_slot]));//+ve anticlockwise
-		pie_MatRotX(DEG(psStructure->turretPitch[weapon_slot]));//+ve up
+		pie_MatRotY(DEG(psStructure->asWeaps[weapon_slot].rotation));	// +ve anticlockwise
+		pie_MatRotX(DEG(psStructure->asWeaps[weapon_slot].pitch));	// +ve up
 		pie_MatRotZ(DEG(0));
 
 		//matrix = the muzzle mount on turret
@@ -7929,9 +7921,9 @@
 	ASSERT(psStructure->pStructureType->type < NUM_DIFF_BUILDINGS, location_description, function, "CHECK_STRUCTURE: Out of bound structure type (%u)", (unsigned int)psStructure->pStructureType->type);
 	ASSERT(psStructure->numWeaps <= STRUCT_MAXWEAPS, location_description, function, "CHECK_STRUCTURE: Out of bound weapon count (%u)", (unsigned int)psStructure->numWeaps);
 
-	for (i = 0; i < ARRAY_SIZE(psStructure->turretRotation); ++i)
+	for (i = 0; i < ARRAY_SIZE(psStructure->asWeaps); ++i)
 	{
-		ASSERT(psStructure->turretRotation[i] <= 360, location_description, function, "CHECK_STRUCTURE: Out of range turret rotation (turret %u; rotation: %u)", i, (unsigned int)psStructure->turretRotation[i]);
+		ASSERT(psStructure->asWeaps[i].rotation <= 360, location_description, function, "CHECK_STRUCTURE: Out of range turret rotation (turret %u; rotation: %u)", i, (unsigned int)psStructure->asWeaps[i].rotation);
 		if (psStructure->psTarget[i])
 		{
 			checkObject(psStructure->psTarget[i], location_description, function, recurse - 1);
Index: src/display3d.c
===================================================================
--- src/display3d.c	(revision 6043)
+++ src/display3d.c	(working copy)
@@ -2116,7 +2116,7 @@
 				{
 					iV_MatrixBegin();
 					iV_TRANSLATE(strImd->connectors[i].x, strImd->connectors[i].z, strImd->connectors[i].y);
-					pie_MatRotY(DEG(-((SDWORD)psStructure->turretRotation[i])));
+					pie_MatRotY(DEG(-((SDWORD)psStructure->asWeaps[i].rotation)));
 					if (mountImd[i] != NULL)
 					{
 						pie_TRANSLATE(0, 0, psStructure->asWeaps[i].recoilValue / 3);
@@ -2127,7 +2127,7 @@
 							iV_TRANSLATE(mountImd[i]->connectors->x, mountImd[i]->connectors->z, mountImd[i]->connectors->y);
 						}
 					}
-					iV_MatrixRotateX(DEG(psStructure->turretPitch[i]));
+					iV_MatrixRotateX(DEG(psStructure->asWeaps[i].pitch));
 					pie_TRANSLATE(0, 0, psStructure->asWeaps[i].recoilValue);
 
 					pie_Draw3DShape(weaponImd[i], playerFrame, 0, buildingBrightness, WZCOL_BLACK, pie_SHADOW,0);
@@ -2144,7 +2144,7 @@
 							iV_TRANSLATE(weaponImd[i]->connectors->x,weaponImd[i]->connectors->z-12,weaponImd[i]->connectors->y);
 							pRepImd = getImdFromIndex(MI_FLAME);
 
-							pie_MatRotY(DEG((SDWORD)psStructure->turretRotation[i]));
+							pie_MatRotY(DEG((SDWORD)psStructure->asWeaps[i].rotation));
 
 							iV_MatrixRotateY(-player.r.y);
 							iV_MatrixRotateX(-player.r.x);
@@ -2152,7 +2152,7 @@
 
 							iV_MatrixRotateX(player.r.x);
 							iV_MatrixRotateY(player.r.y);
-							pie_MatRotY(DEG((SDWORD)psStructure->turretRotation[i]));
+							pie_MatRotY(DEG((SDWORD)psStructure->asWeaps[i].rotation));
 						}
 					}
 					// we have a droid weapon so do we draw a muzzle flash
@@ -2201,16 +2201,16 @@
 						if (strImd->max.y > 80) // babatower
 						{
 							iV_TRANSLATE(0, 80, 0);
-							pie_MatRotY(DEG(-((SDWORD)psStructure->turretRotation[i])));
+							pie_MatRotY(DEG(-((SDWORD)psStructure->asWeaps[i].rotation)));
 							iV_TRANSLATE(0, 0, -20);
 						}
 						else//baba bunker
 						{
 							iV_TRANSLATE(0, 10, 0);
-							pie_MatRotY(DEG(-((SDWORD)psStructure->turretRotation[i])));
+							pie_MatRotY(DEG(-((SDWORD)psStructure->asWeaps[i].rotation)));
 							iV_TRANSLATE(0, 0, -40);
 						}
-						iV_MatrixRotateX(DEG(psStructure->turretPitch[i]));
+						iV_MatrixRotateX(DEG(psStructure->asWeaps[i].pitch));
 						// and draw the muzzle flash
 						// animate for the duration of the flash only
 						// assume no clan colours formuzzle effects
Index: src/projectile.c
===================================================================
--- src/projectile.c	(revision 6043)
+++ src/projectile.c	(working copy)
@@ -570,11 +570,11 @@
 		{
 			if (psAttacker->type == OBJ_DROID)
 			{
-				((DROID *) psAttacker)->turretPitch[weapon_slot] = psObj->pitch;
+				((DROID *) psAttacker)->asWeaps[weapon_slot].pitch = psObj->pitch;
 			}
 			else if (psAttacker->type == OBJ_STRUCTURE)
 			{
-				((STRUCTURE *) psAttacker)->turretPitch[weapon_slot] = psObj->pitch;
+				((STRUCTURE *) psAttacker)->asWeaps[weapon_slot].pitch = psObj->pitch;
 			}
 		}
 
Index: src/map.c
===================================================================
--- src/map.c	(revision 6043)
+++ src/map.c	(working copy)
@@ -367,7 +367,7 @@
 	tagWriteLeave(0x03);
 }
 
-static void objectWeaponTagged(int num, UWORD *rotation, UWORD *pitch, WEAPON *asWeaps, BASE_OBJECT **psTargets)
+static void objectWeaponTagged(int num, WEAPON *asWeaps, BASE_OBJECT **psTargets)
 {
 	int i;
 
@@ -375,8 +375,8 @@
 	for (i = 0; i < num; i++)
 	{
 		tagWrite(0x01, asWeaps[i].nStat);
-		tagWrite(0x02, rotation[i]);
-		tagWrite(0x03, pitch[i]);
+		tagWrite(0x02, asWeaps[i].rotation);
+		tagWrite(0x03, asWeaps[i].pitch);
 		tagWrite(0x05, asWeaps[i].ammo);
 		tagWrite(0x06, asWeaps[i].lastFired);
 		tagWrite(0x07, asWeaps[i].recoilValue);
@@ -401,7 +401,7 @@
 	objectSaveTagged((BASE_OBJECT *)psDroid); /* 0x01 */
 	objectSensorTagged(psDroid->sensorRange, psDroid->sensorPower, 0, psDroid->ECMMod); /* 0x02 */
 	objectStatTagged((BASE_OBJECT *)psDroid, psDroid->originalBody, psDroid->resistance); /* 0x03 */
-	objectWeaponTagged(psDroid->numWeaps, psDroid->turretRotation, psDroid->turretPitch, psDroid->asWeaps, psDroid->psActionTarget);
+	objectWeaponTagged(psDroid->numWeaps, psDroid->asWeaps, psDroid->psActionTarget);
 
 	/* DROID GROUP */
 
@@ -523,7 +523,7 @@
 	objectSaveTagged((BASE_OBJECT *)psStruct); /* 0x01 */
 	objectSensorTagged(psStruct->sensorRange, psStruct->sensorPower, 0, psStruct->ECMMod); /* 0x02 */
 	objectStatTagged((BASE_OBJECT *)psStruct, psStruct->pStructureType->bodyPoints, psStruct->resistance); /* 0x03 */
-	objectWeaponTagged(psStruct->numWeaps, psStruct->turretRotation, psStruct->turretPitch, psStruct->asWeaps, psStruct->psTarget);
+	objectWeaponTagged(psStruct->numWeaps, psStruct->asWeaps, psStruct->psTarget);
 
 	/* STRUCTURE GROUP */
 
Index: src/droid.c
===================================================================
--- src/droid.c	(revision 6043)
+++ src/droid.c	(working copy)
@@ -2915,6 +2915,8 @@
 		psDroid->asWeaps[i].nStat = 0;
 		psDroid->asWeaps[i].ammo = 0;
 		psDroid->asWeaps[i].recoilValue = 0;
+		psDroid->asWeaps[i].rotation = 0;
+		psDroid->asWeaps[i].pitch = 0;
 	}
 
 	psDroid->listSize = 0;
@@ -2965,15 +2967,8 @@
 	psDroid->direction = 0;
 	psDroid->pitch =  0;
 	psDroid->roll = 0;
-	//Watermelon:initialize all weapon turrent rotation pitch info
-	for(i = 0;i < DROID_MAXWEAPS; i++)
-	{
-		psDroid->turretRotation[i] = 0;
-		psDroid->turretPitch[i] = 0;
-	}
 	psDroid->selected = false;
 	psDroid->lastEmission = 0;
-		// ffs AM
 	psDroid->bTargetted = false;
 	psDroid->timeLastHit = UDWORD_MAX;
 	psDroid->lastHitWeapon = UDWORD_MAX;	// no such weapon
@@ -3102,8 +3097,8 @@
 	psDroid->numWeaps = pTemplate->numWeaps;
 	for (inc = 0;inc < psDroid->numWeaps;inc++)
 	{
-		psDroid->turretRotation[inc] = 0;
-		psDroid->turretPitch[inc] = 0;
+		psDroid->asWeaps[inc].rotation = 0;
+		psDroid->asWeaps[inc].pitch = 0;
 	}
 
 	psDroid->body = calcTemplateBody(pTemplate, psDroid->player);
@@ -3487,8 +3482,8 @@
 					  -psShape->connectors[weapon_slot].y);//note y and z flipped
 
 		//matrix = the gun and turret mount on the body
-		pie_MatRotY(DEG(psDroid->turretRotation[weapon_slot]));//+ve anticlockwise
-		pie_MatRotX(DEG(psDroid->turretPitch[weapon_slot]));//+ve up
+		pie_MatRotY(DEG(psDroid->asWeaps[weapon_slot].rotation));	// +ve anticlockwise
+		pie_MatRotX(DEG(psDroid->asWeaps[weapon_slot].pitch));		// +ve up
 		pie_MatRotZ(DEG(0));
 
 		//matrix = the muzzle mount on turret
@@ -5188,7 +5183,7 @@
 
 	for (i = 0; i < DROID_MAXWEAPS; ++i)
 	{
-		ASSERT_HELPER(droid->turretRotation[i] <= 360, location_description, function, "CHECK_DROID: Bad turret rotation of turret %u", i);
+		ASSERT_HELPER(droid->asWeaps[i].rotation <= 360, location_description, function, "CHECK_DROID: Bad turret rotation of turret %u", i);
 		ASSERT_HELPER(droid->asWeaps[i].lastFired <= gameTime, location_description, function, "CHECK_DROID: Bad last fired time for turret %u", i);
 		if (droid->psActionTarget[i])
 		{
Index: src/component.c
===================================================================
--- src/component.c	(revision 6043)
+++ src/component.c	(working copy)
@@ -375,7 +375,7 @@
 				{
 					iV_MatrixBegin();
 					iV_TRANSLATE(strImd->connectors[i].x,strImd->connectors[i].z,strImd->connectors[i].y);
-					pie_MatRotY(DEG(-((SDWORD)psStructure->turretRotation[i])));
+					pie_MatRotY(DEG(-((SDWORD)psStructure->asWeaps[i].rotation)));
 					if (mountImd[i] != NULL)
 					{
 						pie_Draw3DShape(mountImd[i], 0, getPlayerColour(selectedPlayer), WZCOL_WHITE, WZCOL_BLACK, pie_BUTTON, 0);
@@ -384,7 +384,7 @@
 							iV_TRANSLATE(mountImd[i]->connectors->x,mountImd[i]->connectors->z,mountImd[i]->connectors->y);
 						}
 					}
-					iV_MatrixRotateX(DEG(psStructure->turretPitch[i]));
+					iV_MatrixRotateX(DEG(psStructure->asWeaps[i].pitch));
 					pie_Draw3DShape(weaponImd[i], 0, getPlayerColour(selectedPlayer), WZCOL_WHITE, WZCOL_BLACK, pie_BUTTON, 0);
 					//we have a droid weapon so do we draw a muzzle flash
 					iV_MatrixEnd();
@@ -394,7 +394,7 @@
 			{
 				iV_MatrixBegin();
 				iV_TRANSLATE(strImd->connectors->x,strImd->connectors->z,strImd->connectors->y);
-				pie_MatRotY(DEG(-((SDWORD)psStructure->turretRotation[0])));
+				pie_MatRotY(DEG(-((SDWORD)psStructure->asWeaps[0].rotation)));
 				if (mountImd[0] != NULL)
 				{
 					pie_Draw3DShape(mountImd[0], 0, getPlayerColour(selectedPlayer), WZCOL_WHITE, WZCOL_BLACK, pie_BUTTON, 0);
@@ -403,7 +403,7 @@
 						iV_TRANSLATE(mountImd[0]->connectors->x,mountImd[0]->connectors->z,mountImd[0]->connectors->y);
 					}
 				}
-				iV_MatrixRotateX(DEG(psStructure->turretPitch[0]));
+				iV_MatrixRotateX(DEG(psStructure->asWeaps[0].pitch));
 				pie_Draw3DShape(weaponImd[0], 0, getPlayerColour(selectedPlayer), WZCOL_WHITE, WZCOL_BLACK, pie_BUTTON, 0);
 				//we have a droid weapon so do we draw a muzzle flash
 				iV_MatrixEnd();
@@ -1038,9 +1038,9 @@
 											   psShapeTemp->connectors[iConnector + i].y  );
 							}
 
-							if ( psDroid->turretRotation[i] )
+							if ( psDroid->asWeaps[i].rotation )
 							{
-								pie_MatRotY(DEG( (-(SDWORD)psDroid->turretRotation[i])) );
+								pie_MatRotY(DEG( (-(SDWORD)psDroid->asWeaps[i].rotation)) );
 							}
 
 
@@ -1081,12 +1081,12 @@
 							if ( iConnector >= VTOL_CONNECTOR_START )
 							{
 								//pitch the barrel down
-								pie_MatRotX(DEG( (-(psDroid->turretPitch[i])) ));
+								pie_MatRotX(DEG( (-(psDroid->asWeaps[i].pitch)) ));
 							}
 							else
 							{
 								//pitch the barrel up
-								pie_MatRotX(DEG(psDroid->turretPitch[i]));
+								pie_MatRotX(DEG(psDroid->asWeaps[i].pitch));
 							}
 
 							/* Get the weapon (gun?) graphic */
@@ -1155,9 +1155,9 @@
 							   psShapeTemp->connectors[0].z,
 							   psShapeTemp->connectors[0].y  );
 
-				if(psDroid->turretRotation[0])
+				if(psDroid->asWeaps[0].rotation)
 				{
-					pie_MatRotY(DEG( (-(SDWORD)(psDroid->turretRotation[0])) ));
+					pie_MatRotY(DEG( (-(SDWORD)(psDroid->asWeaps[0].rotation)) ));
 				}
 				psShape = SENSOR_MOUNT_IMD(psDroid,psDroid->player);
 				/* Draw it */
@@ -1195,9 +1195,9 @@
 							   psShapeTemp->connectors[0].z,
 							   psShapeTemp->connectors[0].y  );
 
-				if(psDroid->turretRotation[0])
+				if(psDroid->asWeaps[0].rotation)
 				{
-					pie_MatRotY(DEG( (-(SDWORD)(psDroid->turretRotation[0])) ));
+					pie_MatRotY(DEG( (-(SDWORD)(psDroid->asWeaps[0].rotation)) ));
 				}
 				psShape = CONSTRUCT_MOUNT_IMD(psDroid,psDroid->player);
 				/* Draw it */
@@ -1242,9 +1242,9 @@
 							   psShapeTemp->connectors[0].z,
 							   psShapeTemp->connectors[0].y  );
 
-				if(psDroid->turretRotation[0])
+				if(psDroid->asWeaps[0].rotation)
 				{
-					pie_MatRotY(DEG( (-(SDWORD)(psDroid->turretRotation[0])) ));
+					pie_MatRotY(DEG( (-(SDWORD)(psDroid->asWeaps[0].rotation)) ));
 				}
 				psShape = ECM_MOUNT_IMD(psDroid,psDroid->player);
 				/* Draw it */
@@ -1281,9 +1281,9 @@
 							   psShapeTemp->connectors[0].z,
 							   psShapeTemp->connectors[0].y  );
 
-				if(psDroid->turretRotation[0])
+				if(psDroid->asWeaps[0].rotation)
 				{
-					pie_MatRotY(DEG( (-(SDWORD)(psDroid->turretRotation[0])) ));
+					pie_MatRotY(DEG( (-(SDWORD)(psDroid->asWeaps[0].rotation)) ));
 				}
 				psShape = REPAIR_MOUNT_IMD(psDroid,psDroid->player);
 				/* Draw it */
@@ -1321,7 +1321,7 @@
 						pie_MatRotX( DEG( -psDroid->pitch ) );
 						pie_MatRotZ( DEG( -psDroid->roll ) );
 						//Watermelon:rotate Y
-					   	pie_MatRotY(DEG( -( (-(SDWORD)(psDroid->turretRotation[0])) ) ));
+					   	pie_MatRotY(DEG( -( (-(SDWORD)(psDroid->asWeaps[0].rotation)) ) ));
 
 						iV_MatrixRotateY(-player.r.y);
 						iV_MatrixRotateX(-player.r.x);
Index: src/weapondef.h
===================================================================
--- src/weapondef.h	(revision 6043)
+++ src/weapondef.h	(working copy)
@@ -30,6 +30,8 @@
 	UDWORD          ammo;
 	UDWORD          lastFired;      ///< When the weapon last fired
 	UDWORD          recoilValue;
+	UWORD		pitch;
+	UWORD		rotation;
 } WEAPON;
 
 #endif // __INCLUDED_WEAPONDEF_H__
Index: src/droiddef.h
===================================================================
--- src/droiddef.h	(revision 6043)
+++ src/droiddef.h	(working copy)
@@ -135,8 +135,6 @@
 	UDWORD          baseSpeed;                      ///< the base speed dependant on propulsion type
 	UDWORD          originalBody;                   ///< the original body points
 	float           experience;
-	UWORD           turretRotation[DROID_MAXWEAPS]; ///< Watermelon:turretRotation info for multiple turrents :)
-	UWORD           turretPitch[DROID_MAXWEAPS];    ///< Watermelon:turrentPitch info for multiple turrents :)
 	UBYTE           NameVersion;                    ///< Version number used for generating on-the-fly names (e.g. Viper Mk "I" would be stored as 1 - Viper Mk "X" as 10)  - copied from droid template
 
 	SWORD           resistance;                     ///< used in Electronic Warfare
Index: src/game.c
===================================================================
--- src/game.c	(revision 6043)
+++ src/game.c	(working copy)
@@ -5306,8 +5306,8 @@
 	//version 11
 	for (i=0; i < psDroid->numWeaps; i++)
 	{
-		psDroid->turretRotation[i] = psSaveDroid->turretRotation;
-		psDroid->turretPitch[i] = psSaveDroid->turretPitch;
+		psDroid->asWeaps[i].rotation = psSaveDroid->turretRotation;
+		psDroid->asWeaps[i].pitch = psSaveDroid->turretPitch;
 	}
 
 
@@ -5446,8 +5446,8 @@
 		//Watermelon:make it back-compatible with older versions of save
 		for (i=0; i < psDroid->numWeaps; i++)
 		{
-			psDroid->turretRotation[i] = psSaveDroid->turretRotation;
-			psDroid->turretPitch[i] = psSaveDroid->turretPitch;
+			psDroid->asWeaps[i].rotation = psSaveDroid->turretRotation;
+			psDroid->asWeaps[i].pitch = psSaveDroid->turretPitch;
 		}
 	}
 	if (version >= VERSION_12)//version 12
@@ -5861,13 +5861,13 @@
 	{
 		if (version >= VERSION_24)
 		{
-			psDroid->turretRotation[i] = psSaveDroid->turretRotation[i];
-			psDroid->turretPitch[i] = psSaveDroid->turretPitch[i];
+			psDroid->asWeaps[i].rotation = psSaveDroid->turretRotation[i];
+			psDroid->asWeaps[i].pitch = psSaveDroid->turretPitch[i];
 		}
 		else
 		{
-			psDroid->turretRotation[i] = psSaveDroid->turretRotation[0];
-			psDroid->turretPitch[i] = psSaveDroid->turretPitch[0];
+			psDroid->asWeaps[i].rotation = psSaveDroid->turretRotation[0];
+			psDroid->asWeaps[i].pitch = psSaveDroid->turretPitch[0];
 		}
 	}
 	//version 12
@@ -6599,8 +6599,8 @@
 			//Watermelon:endian_udword for new save format
 			for(i = 0;i < psCurr->numWeaps;i++)
 			{
-				psSaveDroid->turretRotation[i] = psCurr->turretRotation[i];
-				psSaveDroid->turretPitch[i]	= psCurr->turretPitch[i];
+				psSaveDroid->turretRotation[i] = psCurr->asWeaps[i].rotation;
+				psSaveDroid->turretPitch[i]	= psCurr->asWeaps[i].pitch;
 			}
 			//version 12
 			psSaveDroid->order			= psCurr->order;
