mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- updated bullet tracer effect again to resolve a savegame compatibility issue and to fix the lighting effects
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@193 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -96,8 +96,8 @@ void UpdateLightingSprite( LIGHTEFFECT *pLight )
|
||||
}
|
||||
|
||||
|
||||
INT32 NewLightEffect( INT16 sGridNo, int ubDuration, UINT8 ubStartRadius )
|
||||
{
|
||||
INT32 NewLightEffect( INT16 sGridNo, UINT16 ubDuration, UINT8 ubStartRadius )
|
||||
{
|
||||
LIGHTEFFECT *pLight;
|
||||
INT32 iLightIndex;
|
||||
|
||||
@@ -159,6 +159,27 @@ void RemoveLightEffectFromTile( INT16 sGridNo )
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN IsLightEffectAtTile( INT16 sGridNo )
|
||||
{
|
||||
LIGHTEFFECT *pLight;
|
||||
UINT32 cnt;
|
||||
|
||||
// Set to unallocated....
|
||||
for ( cnt = 0; cnt < guiNumLightEffects; cnt++ )
|
||||
{
|
||||
pLight = &gLightEffectData[ cnt ];
|
||||
|
||||
if ( pLight->fAllocated )
|
||||
{
|
||||
if ( pLight->sGridNo == sGridNo )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DecayLightEffects( UINT32 uiTime )
|
||||
{
|
||||
@@ -187,6 +208,8 @@ void DecayLightEffects( UINT32 uiTime )
|
||||
{
|
||||
pLight->bAge++;
|
||||
|
||||
if ( pLight->ubDuration <= 0 )
|
||||
fDelete = TRUE;
|
||||
// if this cloud remains effective (duration not reached)
|
||||
if ( pLight->bAge < pLight->ubDuration)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user