mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
*********************************************************
* 2006/05/04 * * Madd Mugsy * * Developed in VS 2003 * ********************************************************* - Added tile lighting animation effects to tracer bullets, forced muzzle flash on tracers so enemies can see you, regardless of flash suppression - Re-enabled laptop animation, since Lesh fixed it (I forgot to mention that in my earlier changes :p) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@54 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -61,6 +61,7 @@ typedef struct
|
||||
ANITILE *pShadowAniTile;
|
||||
UINT8 ubItemStatus;
|
||||
UINT16 fromItem;
|
||||
INT32 flash;
|
||||
} BULLET;
|
||||
|
||||
extern UINT32 guiNumBullets;
|
||||
|
||||
+5
-1
@@ -6637,10 +6637,14 @@ BOOLEAN IsRemoteDetonatorAttached( OBJECTTYPE * pObj )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj )
|
||||
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj, SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
INT8 bLoop;
|
||||
|
||||
//Madd: tracers automatically negate any muzzle flash suppression due to inherent lighting effects
|
||||
if (Item[pObj->usItem].usItemClass == IC_GUN && AmmoTypes[pObj->ubGunAmmoType].tracerEffect && pSoldier->bDoBurst )
|
||||
return FALSE;
|
||||
|
||||
if (Item[pObj->usItem].hidemuzzleflash )
|
||||
return TRUE;
|
||||
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ INT8 FindNonSmokeLaunchable( SOLDIERTYPE * pSoldier, UINT16 usWeapon );
|
||||
INT8 FindNonSmokeLaunchableAttachment( OBJECTTYPE * pObj, UINT16 usWeapon );
|
||||
UINT16 PickARandomLaunchable(UINT16 itemIndex);
|
||||
|
||||
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj );
|
||||
BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj, SOLDIERTYPE * pSoldier );
|
||||
INT16 GetFlashSuppressorStatus( OBJECTTYPE * pObj );
|
||||
BOOLEAN IsRemoteDetonator( OBJECTTYPE * pObj );
|
||||
BOOLEAN IsDetonator( OBJECTTYPE * pObj );
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ void ResetRain()
|
||||
|
||||
void GenerateRainDropsList()
|
||||
{
|
||||
guiCurrMaxAmountOfRainDrops = (UINT32)BASE_MAXIMUM_DROPS * gbCurrentRainIntensity;
|
||||
guiCurrMaxAmountOfRainDrops = (UINT32)(BASE_MAXIMUM_DROPS) * gbCurrentRainIntensity;
|
||||
|
||||
pRainDrops = (TRainDrop *)MemAlloc( sizeof( TRainDrop ) * guiCurrMaxAmountOfRainDrops );
|
||||
memset( pRainDrops, 0, sizeof( TRainDrop ) * guiCurrMaxAmountOfRainDrops );
|
||||
|
||||
@@ -2796,7 +2796,7 @@ void EVENT_FireSoldierWeapon( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo )
|
||||
// break;
|
||||
//}
|
||||
|
||||
if ( IsFlashSuppressor (&pSoldier->inv[ pSoldier->ubAttackingHand ] ) )
|
||||
if ( IsFlashSuppressor (&pSoldier->inv[ pSoldier->ubAttackingHand ], pSoldier ) )
|
||||
pSoldier->fMuzzleFlash = FALSE;
|
||||
else
|
||||
pSoldier->fMuzzleFlash = TRUE;
|
||||
|
||||
@@ -1737,7 +1737,7 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT16 sTargetGridNo )
|
||||
fBuckshot = FALSE;
|
||||
if (!CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||
{
|
||||
if ( IsFlashSuppressor(&pSoldier->inv[ pSoldier->ubAttackingHand ]) )
|
||||
if ( IsFlashSuppressor(&pSoldier->inv[ pSoldier->ubAttackingHand ], pSoldier ) )
|
||||
pSoldier->fMuzzleFlash = FALSE;
|
||||
else
|
||||
pSoldier->fMuzzleFlash = TRUE;
|
||||
|
||||
@@ -409,9 +409,11 @@ void AddMissileTrail( BULLET *pBullet, FIXEDPT qCurrX, FIXEDPT qCurrY, FIXEDPT q
|
||||
else if ( pBullet->usFlags & ( BULLET_FLAG_TRACER ) )
|
||||
{
|
||||
strcpy( AniParams.zCachedFile, "TILECACHE\\BULLET_TRACER.STI" );
|
||||
AniParams.uiFlags |= ANITILE_LIGHT;
|
||||
}
|
||||
|
||||
CreateAnimationTile( &AniParams );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user