-disabled sniper orders for soldiers w/sniper rifles w/out scopes

-added sight checking for snipers when they turn
-removed sniper attitude changes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@284 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-06-22 03:16:16 +00:00
parent f83af12336
commit 634537e5ce
3 changed files with 9 additions and 11 deletions
+1 -7
View File
@@ -130,16 +130,10 @@ void DecideToAssignSniperOrders( SOLDIERCREATE_STRUCT * pp )
if ( pp->bOrders == STATIONARY || pp->bOrders == ONGUARD )
{
// 30% of anybody w/a scope and decent range being a sniper, 80% chance of a guy w/a sniper rifle being a sniper
if ( (GunRange(&pp->Inv[HANDPOS]) >= 40 && IsScoped(&pp->Inv[HANDPOS]) && Random(100) < 30) || ( Weapon[pp->Inv[HANDPOS].usItem].ubWeaponType == GUN_SN_RIFLE && Random(100) < 80 ) )
if ( (GunRange(&pp->Inv[HANDPOS]) >= 40 && IsScoped(&pp->Inv[HANDPOS]) && Random(100) < 30) || ( Weapon[pp->Inv[HANDPOS].usItem].ubWeaponType == GUN_SN_RIFLE && IsScoped(&pp->Inv[HANDPOS]) && Random(100) < 80 ) )
{
pp->bOrders = SNIPER;
if (pp->bAttitude == BRAVEAID)
pp->bAttitude = BRAVESOLO;
if (pp->bAttitude == CUNNINGAID)
pp->bAttitude = CUNNINGSOLO;
DebugMsg ( TOPIC_JA2AI , DBG_LEVEL_3 , String("Sniper Created") );
}
}