Tweaks to suspicion logic - reduce significantly if the player shoot or kills a civilian craft. Limit reduction to -10%.
This commit is contained in:
parent
438dd14dca
commit
0449dba7a1
|
@ -1115,7 +1115,7 @@ void checkSuspicionLevel(void)
|
|||
}
|
||||
else if (distance <= SCREEN_HEIGHT / 2)
|
||||
{
|
||||
battle.suspicionLevel = MAX(battle.suspicionLevel - 1, 0);
|
||||
battle.suspicionLevel--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,7 +187,14 @@ static void checkCollisions(Bullet *b)
|
|||
|
||||
if (battle.hasSuspicionLevel)
|
||||
{
|
||||
battle.suspicionLevel -= 2;
|
||||
if (e->aiFlags & (AIF_AVOIDS_COMBAT|AIF_DEFENSIVE))
|
||||
{
|
||||
battle.suspicionLevel -= (MAX_SUSPICION_LEVEL * 0.1);
|
||||
}
|
||||
else
|
||||
{
|
||||
battle.suspicionLevel -= (MAX_SUSPICION_LEVEL * 0.001);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,14 @@ void doEntities(void)
|
|||
|
||||
if (e->killedBy == player && battle.hasSuspicionLevel)
|
||||
{
|
||||
battle.suspicionLevel -= (MAX_SUSPICION_LEVEL * 0.12);
|
||||
if (e->aiFlags & (AIF_AVOIDS_COMBAT|AIF_DEFENSIVE))
|
||||
{
|
||||
battle.suspicionLevel -= (MAX_SUSPICION_LEVEL * 0.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
battle.suspicionLevel -= (MAX_SUSPICION_LEVEL * 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
if (e == player)
|
||||
|
|
|
@ -353,9 +353,15 @@ static void handleMouse(void)
|
|||
fireRocket(player);
|
||||
}
|
||||
|
||||
if (battle.hasSuspicionLevel && !battle.numEnemies && !battle.suspicionCoolOff)
|
||||
if (battle.hasSuspicionLevel)
|
||||
{
|
||||
battle.suspicionLevel += (MAX_SUSPICION_LEVEL * 0.05);
|
||||
if (!battle.numEnemies && !battle.suspicionCoolOff)
|
||||
{
|
||||
battle.suspicionLevel += (MAX_SUSPICION_LEVEL * 0.05);
|
||||
}
|
||||
|
||||
/* don't allow the suspicion level to drop too far */
|
||||
battle.suspicionLevel = MAX(battle.suspicionLevel, -(MAX_SUSPICION_LEVEL * 0.1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue