mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New Feature: scuba gear allows to dive, thereby staying invisible to the enemy as long as you are in deep water. If you are spotted however, the enemy remembers that, and can still see you in deep water.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5718 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -239,6 +239,8 @@ UINT32 guiVEHINV;
|
||||
UINT32 guiBURSTACCUM;
|
||||
UINT32 guiITEMPOINTERHATCHES;
|
||||
|
||||
UINT32 guiUNDERWATER; // added by Flugente
|
||||
|
||||
// UI Globals
|
||||
MOUSE_REGION gViewportRegion;
|
||||
MOUSE_REGION gRadarRegion;
|
||||
@@ -514,6 +516,12 @@ BOOLEAN InitializeTacticalInterface( )
|
||||
if( !AddVideoObject( &VObjectDesc, &guiBURSTACCUM ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\burst1.sti" );
|
||||
|
||||
// Flugente: load fish symbol (signifies that a merc is diving until someone comes up with a proper animation)
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("INTERFACE\\fish.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &guiUNDERWATER ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\fish.sti" );
|
||||
|
||||
//CHRISL: Moved to seperate function so we can call seperately
|
||||
InitializeTacticalPortraits();
|
||||
|
||||
@@ -1747,7 +1755,45 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
}
|
||||
}
|
||||
}
|
||||
// Flugente: show a small animation hat signifies that a merc is underwater (hopefully temporary until someone comes up with a proper animation)
|
||||
else if ( pSoldier->UsesScubaGear() )
|
||||
{
|
||||
if ( TIMECOUNTERDONE( pSoldier->timeCounters.BlinkSelCounter, 320 ) )
|
||||
{
|
||||
RESETTIMECOUNTER( pSoldier->timeCounters.BlinkSelCounter, 320 );
|
||||
|
||||
// Update frame
|
||||
pSoldier->sLocatorFrame++;
|
||||
|
||||
if ( pSoldier->sLocatorFrame == 5 )
|
||||
{
|
||||
// Update time we do this
|
||||
pSoldier->sLocatorFrame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.fFlashLocator == pSoldier->ubNumLocateCycles )
|
||||
{
|
||||
pSoldier->flags.fShowLocator = FALSE;
|
||||
}
|
||||
|
||||
// Render the beastie
|
||||
GetSoldierAboveGuyPositions( pSoldier, &sXPos, &sYPos, TRUE );
|
||||
|
||||
// Adjust for bars!
|
||||
sXPos += 25;
|
||||
sYPos += 25;
|
||||
|
||||
// Add bars
|
||||
iBack = RegisterBackgroundRect( BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos +40 ), (INT16)(sYPos + 40 ) );
|
||||
|
||||
if ( iBack != -1 )
|
||||
{
|
||||
SetBackgroundRectFilled( iBack );
|
||||
}
|
||||
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiUNDERWATER, pSoldier->sLocatorFrame, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
|
||||
if ( !pSoldier->flags.fShowLocator )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user