mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
-reduced # of guys getting sniper orders - restricted to just the onguard and stationary guys. Hopefully, this will keep them out of the city assault teams & patrols.
-added some more raise weapon code for snipers who have nothing to do. This shouldn't really be required since less snipers will be present in assaults. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@259 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -127,20 +127,22 @@ void DecideToAssignSniperOrders( SOLDIERCREATE_STRUCT * pp )
|
||||
{
|
||||
//Madd: decide if soldier should be a sniper
|
||||
|
||||
// 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 ( pp->bOrders == STATIONARY || pp->bOrders == ONGUARD )
|
||||
{
|
||||
pp->bOrders = SNIPER;
|
||||
// 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 ) )
|
||||
{
|
||||
pp->bOrders = SNIPER;
|
||||
|
||||
if (pp->bAttitude == BRAVEAID)
|
||||
pp->bAttitude = BRAVESOLO;
|
||||
if (pp->bAttitude == BRAVEAID)
|
||||
pp->bAttitude = BRAVESOLO;
|
||||
|
||||
if (pp->bAttitude == CUNNINGAID)
|
||||
pp->bAttitude = CUNNINGSOLO;
|
||||
if (pp->bAttitude == CUNNINGAID)
|
||||
pp->bAttitude = CUNNINGSOLO;
|
||||
|
||||
DebugMsg ( TOPIC_JA2AI , DBG_LEVEL_3 , String("Sniper Created") );
|
||||
DebugMsg ( TOPIC_JA2AI , DBG_LEVEL_3 , String("Sniper Created") );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *pubID )
|
||||
|
||||
Reference in New Issue
Block a user