From 790bd9b472bc1dfc88df74b8afed6c5e01635c88 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Wed, 7 Aug 2013 14:30:03 +0100 Subject: [PATCH] [Change] Tweaked faction hits from combat a bit. --- src/weapon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/weapon.c b/src/weapon.c index 88832eb..677bb5a 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -312,9 +312,9 @@ static void weapon_update(Weapon* w, const double dt, WeaponLayer layer) { static void weapon_hit(Weapon* w, Pilot* p, WeaponLayer layer) { /* Someone should let the ai know it's been attacked. */ if(!pilot_isPlayer(p)) { - if((player_target == p->id) || (RNG(0,2) == 0)) { + if((player_target == p->id) || (RNG(0,2) == 0)) { /* 33% chance. */ if((w->parent == PLAYER_ID) && - (!pilot_isFlag(p, PILOT_HOSTILE) || (RNG(0, 2) == 0))) { + (!pilot_isFlag(p, PILOT_HOSTILE) || (RNG(0, 1) == 0))) { /* 50% chance. */ faction_modPlayer(p->faction, -1); /* Slowly lower faction. */ pilot_setFlag(p, PILOT_HOSTILE); }