mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fixes the missing muzzle flash lighting when firing in the dark. The flag was actually never set when using NCTH, and UseGunNCTH() that was supposed to set it gets called after the animation control checks whether a muzzleflash is true or not, so I had to add the setting the flag just before that check (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9279 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -77,7 +77,7 @@ class SOLDIERTYPE;
|
||||
#include "connect.h"
|
||||
#include "fresh_header.h"
|
||||
#define NO_JUMP 0
|
||||
#define MAX_ANIFRAMES_PER_FLASH 2
|
||||
#define MAX_ANIFRAMES_PER_FLASH 3
|
||||
//#define TIME_FOR_RANDOM_ANIM_CHECK 10
|
||||
#define TIME_FOR_RANDOM_ANIM_CHECK 1
|
||||
|
||||
@@ -592,6 +592,18 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
OBJECTTYPE* pObjAttHand = pSoldier->GetUsedWeapon(&pSoldier->inv[pSoldier->ubAttackingHand]);
|
||||
if (IsFlashSuppressor(pObjAttHand, pSoldier))
|
||||
{
|
||||
pSoldier->flags.fMuzzleFlash = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
pSoldier->flags.fMuzzleFlash = TRUE;
|
||||
}
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("UseGun: Muzzle flash = %d", pSoldier->flags.fMuzzleFlash));
|
||||
}
|
||||
if ( !pSoldier->flags.fMuzzleFlash )
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user