- 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:
MaddMugsy
2006-06-08 04:40:55 +00:00
parent 454a0575d8
commit a38002f606
6 changed files with 50 additions and 13 deletions
+25 -2
View File
@@ -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)
{