Permalink
Browse files

Fix displayed sensor range of droids.

Upgrades were not taken into account when displaying the sensor range of droids (using Shift+F12 to enable).
  • Loading branch information...
Cyp committed Oct 4, 2012
1 parent b1a1a8e commit abfae5ffde5e9226b196d1fb8344e89f84f8d7de
Showing with 1 addition and 14 deletions.
  1. +1 −14 src/display3d.cpp
View
@@ -4118,20 +4118,7 @@ static void showWeaponRange(BASE_OBJECT *psObj)
static void showSensorRange2(BASE_OBJECT *psObj)
{
- uint32_t sensorRange;
-
- if(psObj->type == OBJ_DROID)
- {
- DROID *psDroid = (DROID*)psObj;
- sensorRange = asSensorStats[psDroid->asBits[COMP_SENSOR].nStat].range;
- }
- else
- {
- STRUCTURE *psStruct = (STRUCTURE*)psObj;
- sensorRange = structSensorRange(psStruct);
- }
-
- showEffectCircle(psObj->pos, sensorRange, 80, EFFECT_EXPLOSION, EXPLOSION_TYPE_LASER);
+ showEffectCircle(psObj->pos, psObj->sensorRange, 80, EFFECT_EXPLOSION, EXPLOSION_TYPE_LASER);
showWeaponRange(psObj);
}

0 comments on commit abfae5f

Please sign in to comment.