mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- bugfix: Ira invisible bug in rebel basement
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@652 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -746,7 +746,7 @@ BOOLEAN DeInitAnimationSystem( )
|
||||
if ( gAnimSurfaceDatabase[ cnt1 ].hVideoObject != NULL )
|
||||
{
|
||||
DeleteVideoObject( gAnimSurfaceDatabase[ cnt1 ].hVideoObject );
|
||||
gAnimSurfaceDatabase[ cnt1 ].hVideoObject = NULL;
|
||||
gAnimSurfaceDatabase[ cnt1 ].hVideoObject = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,6 +816,12 @@ BOOLEAN LoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex, UINT16
|
||||
{
|
||||
AuxObjectData *pAuxData;
|
||||
|
||||
if (usSurfaceIndex == 251)
|
||||
{
|
||||
int a = 10;
|
||||
a++;
|
||||
}
|
||||
|
||||
// Check for valid surface
|
||||
CHECKF( usSurfaceIndex < NUMANIMATIONSURFACETYPES );
|
||||
|
||||
@@ -935,6 +941,13 @@ BOOLEAN LoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex, UINT16
|
||||
|
||||
BOOLEAN UnLoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex )
|
||||
{
|
||||
|
||||
if (usSurfaceIndex == 251)
|
||||
{
|
||||
int a = 10;
|
||||
a++;
|
||||
}
|
||||
|
||||
// Decrement usage flag, only if this soldier has it currently tagged
|
||||
if ( gbAnimUsageHistory[ usSurfaceIndex ][ usSoldierID ] > 0 )
|
||||
{
|
||||
@@ -960,6 +973,8 @@ BOOLEAN UnLoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex )
|
||||
gAnimSurfaceDatabase[ usSurfaceIndex ].bUsageCount = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Check if count has reached zero and delet if so
|
||||
if ( gAnimSurfaceDatabase[ usSurfaceIndex ].bUsageCount == 0 )
|
||||
|
||||
+17
-4
@@ -7536,12 +7536,25 @@ void ApplyEquipmentBonuses(SOLDIERTYPE * pSoldier)
|
||||
pSoldier->wornSnowCamo = (INT8)newSnowCamo;
|
||||
|
||||
if ( (newCamo > oldCamo || newUrbanCamo > oldUrbanCamo || newDesertCamo > oldDesertCamo || newSnowCamo > oldSnowCamo )&& pSoldier->bTeam == OUR_TEAM )
|
||||
{
|
||||
DoMercBattleSound( pSoldier, BATTLE_SOUND_COOL1 );
|
||||
|
||||
|
||||
// WANNE: Only call the method if oldCame != newCamo
|
||||
if ( pSoldier->bInSector)
|
||||
CreateSoldierPalettes( pSoldier );
|
||||
}
|
||||
else if ( (newCamo < oldCamo || newUrbanCamo < oldUrbanCamo || newDesertCamo < oldDesertCamo || newSnowCamo < oldSnowCamo )&& pSoldier->bTeam == OUR_TEAM )
|
||||
{
|
||||
// WANNE: Only call the method if oldCame != newCamo
|
||||
if ( pSoldier->bInSector)
|
||||
CreateSoldierPalettes( pSoldier );
|
||||
}
|
||||
// WANNE: IRA: Madd, I commented this, because this leads to IRAs INVISIBLE BUG!
|
||||
// We should only call the CreateSoldierPalettes if oldCamo != newCamo. See above!
|
||||
//Madd: do this regardless of camo. This will need to be called to do custom part colours and new overlays anyway.
|
||||
if ( pSoldier->bInSector)
|
||||
CreateSoldierPalettes( pSoldier );
|
||||
|
||||
//if ( pSoldier->bInSector)
|
||||
// CreateSoldierPalettes( pSoldier );
|
||||
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
|
||||
|
||||
@@ -2254,6 +2254,7 @@ BOOLEAN EVENT_InitNewSoldierAnim( SOLDIERTYPE *pSoldier, UINT16 usNewState, UINT
|
||||
HandleSight(pSoldier,SIGHT_LOOK);
|
||||
}
|
||||
}
|
||||
|
||||
// If our own guy...
|
||||
if ( pSoldier->bTeam == gbPlayerNum )
|
||||
{
|
||||
|
||||
@@ -1792,7 +1792,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
||||
pShadeTable = pSoldier->pEffectShades[ 1 ];
|
||||
}
|
||||
|
||||
|
||||
hVObject=gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject;
|
||||
|
||||
if ( hVObject == NULL )
|
||||
|
||||
+3
-2
@@ -12,17 +12,18 @@
|
||||
//#define JA2TESTVERSION
|
||||
|
||||
|
||||
// Debug version of the editor!
|
||||
// Remove comment to build the editor!
|
||||
//#define JA2EDITOR
|
||||
|
||||
|
||||
// Editor
|
||||
// Remove comment to build the editor!
|
||||
#ifdef _DEBUG
|
||||
#ifndef JA2TESTVERSION
|
||||
#define JA2TESTVERSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Remove comment to build the editor!
|
||||
|
||||
// Do combinations
|
||||
#ifdef JA2TESTVERSION
|
||||
|
||||
Reference in New Issue
Block a user