Fix: when using scope modes with NCTH, non-internal projection factor from lasers was ignored.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6078 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-05-14 21:11:24 +00:00
parent e365ac9f1b
commit cefa9cfcc1
3 changed files with 38 additions and 7 deletions
+3 -7
View File
@@ -7813,13 +7813,9 @@ FLOAT CalcProjectionFactor( SOLDIERTYPE *pShooter, OBJECTTYPE *pWeapon, FLOAT d2
// Flugente: if scope modes are allowed, player team uses them
if ( gGameExternalOptions.fScopeModes && pShooter && pShooter->bTeam == gbPlayerNum && pObjUsed->exists() == true && Item[pObjUsed->usItem].usItemClass == IC_GUN )
{
// Flugente: check for scope mode
std::map<INT8, OBJECTTYPE*> ObjList;
GetScopeLists(pObjUsed, ObjList);
// only use scope mode if gun is in hand, otherwise an error might occur!
if ( (&pShooter->inv[HANDPOS]) == pObjUsed && ObjList[pShooter->bScopeMode] != NULL && pShooter->bScopeMode != USE_ALT_WEAPON_HOLD )
iProjectionFactor = Item[ObjList[pShooter->bScopeMode]->usItem].projectionfactor;
// we calculate the projection factor of the item, but EXCLUDE those factors coming from scopes/sights we are not using at the moment. This means that factors from lasers
// count, but from reflex sights only if we are using the specific sight
iProjectionFactor = GetScopeModeProjectionFactor(pShooter, pObjUsed);
}
else
iProjectionFactor = GetProjectionFactor( pObjUsed );