-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
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else
//RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.274" };
INT16 zVersionLabel[256] = { L"Release v1.13.284" };
#endif
INT8 czVersionNumber[16] = { "Build 06.06.19" };
INT8 czVersionNumber[16] = { "Build 06.06.21" };
INT16 zTrackingNumber[16] = { L"Z" };
+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") );
}
}
+6 -2
View File
@@ -1089,11 +1089,15 @@ void FreeUpNPCFromTurning(SOLDIERTYPE *pSoldier, INT8 bLook)
ActionDone(pSoldier);
if (bLook)
if ( bLook )
{
//HandleSight(pSoldier,SIGHT_LOOK | SIGHT_RADIO); // no interrupt possible
//HandleSight(pSoldier,SIGHT_LOOK | SIGHT_RADIO); // no interrupt possible
}
if (pSoldier->bOrders == SNIPER )
{
HandleSight(pSoldier,SIGHT_LOOK | SIGHT_RADIO);
}
}
}