Skip to content

Commit

Permalink
Remove droids fire and move slower when damaged rule. It was confusin…
Browse files Browse the repository at this point in the history
…g and led to less tactical play.
  • Loading branch information
perim committed Nov 20, 2011
1 parent 3aba15e commit 88815c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
22 changes: 0 additions & 22 deletions src/combat.cpp
Expand Up @@ -39,12 +39,10 @@
// maximum random pause for firing
#define RANDOM_PAUSE 500

// Watermelon:real projectile
/* Fire a weapon at something */
bool combFire(WEAPON *psWeap, BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, int weapon_slot)
{
WEAPON_STATS *psStats;
UDWORD damLevel;
UDWORD firePause;
SDWORD longRange;
DROID *psDroid = NULL;
Expand Down Expand Up @@ -89,26 +87,6 @@ bool combFire(WEAPON *psWeap, BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, in
/* See when the weapon last fired to control it's rate of fire */
firePause = weaponFirePause(psStats, psAttacker->player);

// increase the pause if heavily damaged
switch (psAttacker->type)
{
case OBJ_DROID:
psDroid = (DROID *)psAttacker;
damLevel = PERCENT(psDroid->body, psDroid->originalBody);
break;
case OBJ_STRUCTURE:
damLevel = PERCENT(((STRUCTURE *)psAttacker)->body, structureBody((STRUCTURE *)psAttacker));
break;
default:
damLevel = 100;
break;
}

if (damLevel < HEAVY_DAMAGE_LEVEL)
{
firePause += firePause;
}

if (gameTime - psWeap->lastFired <= firePause)
{
/* Too soon to fire again */
Expand Down
11 changes: 2 additions & 9 deletions src/move.cpp
Expand Up @@ -1351,13 +1351,13 @@ static bool moveReachedWayPoint(DROID *psDroid)

#define MAX_SPEED_PITCH 60

/** Calculate the new speed for a droid based on factors like damage and pitch.
/** Calculate the new speed for a droid based on factors like pitch.
* @todo Remove hack for steep slopes not properly marked as blocking on some maps.
*/
SDWORD moveCalcDroidSpeed(DROID *psDroid)
{
const uint16_t maxPitch = DEG(MAX_SPEED_PITCH);
UDWORD mapX,mapY, damLevel;
UDWORD mapX, mapY;
int speed, pitch;
WEAPON_STATS *psWStats;

Expand All @@ -1380,13 +1380,6 @@ SDWORD moveCalcDroidSpeed(DROID *psDroid)
speed = 10;
}

// slow down damaged droids
damLevel = PERCENT(psDroid->body, psDroid->originalBody);
if (damLevel < HEAVY_DAMAGE_LEVEL)
{
speed = 2 * speed / 3;
}

// stop droids that have just fired a no fire while moving weapon
if (psDroid->numWeaps > 0)
{
Expand Down

0 comments on commit 88815c3

Please sign in to comment.