Permalink
Browse files

Clean up super sensor handling. The WSS is not a counter-battery sensor

since a while ago, so remove superfluous and bad checks.
  • Loading branch information...
perim committed Mar 15, 2013
1 parent d80cad9 commit 983d77d016ddbec88341e10acbd73b8ac56fd2d2
Showing with 8 additions and 19 deletions.
  1. +1 −2 src/action.cpp
  2. +6 −15 src/droid.cpp
  3. +1 −2 src/visibility.cpp
View
@@ -1661,8 +1661,7 @@ void actionUpdateDroid(DROID *psDroid)
// align the turret
actionTargetTurret(psDroid, psDroid->psActionTarget[0], &psDroid->asWeaps[0]);
- // WSS shouldn't get a free pass to hit anything on map
- if (order->type != DORDER_HOLD && !cbSensorDroid(psDroid) && !asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type != SUPER_SENSOR)
+ if (order->type != DORDER_HOLD && !cbSensorDroid(psDroid))
{
// make sure the target is within sensor range
const int xdiff = (SDWORD)psDroid->pos.x - (SDWORD)psDroid->psActionTarget[0]->pos.x;
View
@@ -3282,12 +3282,8 @@ bool cbSensorDroid(DROID *psDroid)
{
return false;
}
-
- /*Super Sensor works as any type*/
- if (asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type ==
- VTOL_CB_SENSOR ||
- asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type ==
- INDIRECT_CB_SENSOR)
+ if (asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type == VTOL_CB_SENSOR
+ || asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type == INDIRECT_CB_SENSOR)
{
return true;
}
@@ -3302,18 +3298,13 @@ bool standardSensorDroid(DROID *psDroid)
{
return false;
}
-
- /*Super Sensor works as any type*/
- if (asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type ==
- VTOL_INTERCEPT_SENSOR ||
- asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type ==
- STANDARD_SENSOR ||
- asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type ==
- SUPER_SENSOR)
+ if (asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type == VTOL_INTERCEPT_SENSOR
+ || asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type == STANDARD_SENSOR
+ || asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type == SUPER_SENSOR)
{
return true;
}
-
+
return false;
}
View
@@ -526,8 +526,7 @@ static void processVisibilitySelf(BASE_OBJECT *psObj)
setSeenByInstantly(psStruct->psTarget[0], psObj->player, UBYTE_MAX);
}
DROID *psDroid = castDroid(psObj);
- // WSS shouldn't get a free pass to hit anything on map
- if (psDroid != NULL && psDroid->action == DACTION_OBSERVE && cbSensorDroid(psDroid) && asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].type != SUPER_SENSOR)
+ if (psDroid != NULL && psDroid->action == DACTION_OBSERVE && cbSensorDroid(psDroid))
{
// Anyone commenting this out will get a knee capping from John.
// You have been warned!!

0 comments on commit 983d77d

Please sign in to comment.