mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
-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:
@@ -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") );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user