mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +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 )
|
if ( gAnimSurfaceDatabase[ cnt1 ].hVideoObject != NULL )
|
||||||
{
|
{
|
||||||
DeleteVideoObject( gAnimSurfaceDatabase[ cnt1 ].hVideoObject );
|
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;
|
AuxObjectData *pAuxData;
|
||||||
|
|
||||||
|
if (usSurfaceIndex == 251)
|
||||||
|
{
|
||||||
|
int a = 10;
|
||||||
|
a++;
|
||||||
|
}
|
||||||
|
|
||||||
// Check for valid surface
|
// Check for valid surface
|
||||||
CHECKF( usSurfaceIndex < NUMANIMATIONSURFACETYPES );
|
CHECKF( usSurfaceIndex < NUMANIMATIONSURFACETYPES );
|
||||||
|
|
||||||
@@ -935,6 +941,13 @@ BOOLEAN LoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex, UINT16
|
|||||||
|
|
||||||
BOOLEAN UnLoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex )
|
BOOLEAN UnLoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (usSurfaceIndex == 251)
|
||||||
|
{
|
||||||
|
int a = 10;
|
||||||
|
a++;
|
||||||
|
}
|
||||||
|
|
||||||
// Decrement usage flag, only if this soldier has it currently tagged
|
// Decrement usage flag, only if this soldier has it currently tagged
|
||||||
if ( gbAnimUsageHistory[ usSurfaceIndex ][ usSoldierID ] > 0 )
|
if ( gbAnimUsageHistory[ usSurfaceIndex ][ usSoldierID ] > 0 )
|
||||||
{
|
{
|
||||||
@@ -961,6 +974,8 @@ BOOLEAN UnLoadAnimationSurface( UINT16 usSoldierID, UINT16 usSurfaceIndex )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Check if count has reached zero and delet if so
|
// Check if count has reached zero and delet if so
|
||||||
if ( gAnimSurfaceDatabase[ usSurfaceIndex ].bUsageCount == 0 )
|
if ( gAnimSurfaceDatabase[ usSurfaceIndex ].bUsageCount == 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
+15
-2
@@ -7536,11 +7536,24 @@ void ApplyEquipmentBonuses(SOLDIERTYPE * pSoldier)
|
|||||||
pSoldier->wornSnowCamo = (INT8)newSnowCamo;
|
pSoldier->wornSnowCamo = (INT8)newSnowCamo;
|
||||||
|
|
||||||
if ( (newCamo > oldCamo || newUrbanCamo > oldUrbanCamo || newDesertCamo > oldDesertCamo || newSnowCamo > oldSnowCamo )&& pSoldier->bTeam == OUR_TEAM )
|
if ( (newCamo > oldCamo || newUrbanCamo > oldUrbanCamo || newDesertCamo > oldDesertCamo || newSnowCamo > oldSnowCamo )&& pSoldier->bTeam == OUR_TEAM )
|
||||||
|
{
|
||||||
DoMercBattleSound( pSoldier, BATTLE_SOUND_COOL1 );
|
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.
|
//Madd: do this regardless of camo. This will need to be called to do custom part colours and new overlays anyway.
|
||||||
if ( pSoldier->bInSector)
|
//if ( pSoldier->bInSector)
|
||||||
CreateSoldierPalettes( pSoldier );
|
// CreateSoldierPalettes( pSoldier );
|
||||||
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2254,6 +2254,7 @@ BOOLEAN EVENT_InitNewSoldierAnim( SOLDIERTYPE *pSoldier, UINT16 usNewState, UINT
|
|||||||
HandleSight(pSoldier,SIGHT_LOOK);
|
HandleSight(pSoldier,SIGHT_LOOK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If our own guy...
|
// If our own guy...
|
||||||
if ( pSoldier->bTeam == gbPlayerNum )
|
if ( pSoldier->bTeam == gbPlayerNum )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1792,7 +1792,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
|||||||
pShadeTable = pSoldier->pEffectShades[ 1 ];
|
pShadeTable = pSoldier->pEffectShades[ 1 ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hVObject=gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject;
|
hVObject=gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject;
|
||||||
|
|
||||||
if ( hVObject == NULL )
|
if ( hVObject == NULL )
|
||||||
|
|||||||
+3
-2
@@ -12,17 +12,18 @@
|
|||||||
//#define JA2TESTVERSION
|
//#define JA2TESTVERSION
|
||||||
|
|
||||||
|
|
||||||
// Debug version of the editor!
|
// Remove comment to build the editor!
|
||||||
//#define JA2EDITOR
|
//#define JA2EDITOR
|
||||||
|
|
||||||
|
|
||||||
// Editor
|
// Remove comment to build the editor!
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#ifndef JA2TESTVERSION
|
#ifndef JA2TESTVERSION
|
||||||
#define JA2TESTVERSION
|
#define JA2TESTVERSION
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Remove comment to build the editor!
|
||||||
|
|
||||||
// Do combinations
|
// Do combinations
|
||||||
#ifdef JA2TESTVERSION
|
#ifdef JA2TESTVERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user