mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New ammotype: cryo ammo deals no damage, but freezes a soldier for two turns (stackable effect). A frozen soldier cannot perform actions, and has drastically lowered damage resistance. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22926&start=0&
Requires GameDir >= r2284. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8034 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+55
-43
@@ -1698,7 +1698,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
{
|
||||
pSoldier = MercPtrs[ pFace->ubSoldierID ];
|
||||
|
||||
if ( ( MercPtrs[ pFace->ubSoldierID ]->stats.bLife < CONSCIOUSNESS || MercPtrs[ pFace->ubSoldierID ]->flags.fDeadPanel ) )
|
||||
if ( (MercPtrs[pFace->ubSoldierID]->stats.bLife < CONSCIOUSNESS || MercPtrs[pFace->ubSoldierID]->flags.fDeadPanel ) )
|
||||
{
|
||||
// Blit Closed eyes here!
|
||||
BltVideoObjectFromIndex( uiRenderBuffer, pFace->uiVideoObject, 1, usEyesX, usEyesY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
@@ -1713,6 +1713,16 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
BltVideoObjectFromIndex( uiRenderBuffer, pFace->uiVideoObject, 1, usEyesX, usEyesY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
|
||||
// Flugente: frozen soldiers are, well, frozen
|
||||
if ( MercPtrs[pFace->ubSoldierID]->usSkillCooldown[SOLDIER_COOLDOWN_CRYO] )
|
||||
{
|
||||
// Blit Closed eyes here!
|
||||
BltVideoObjectFromIndex( uiRenderBuffer, pFace->uiVideoObject, 2, usEyesX, usEyesY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
|
||||
// Blit hatch!
|
||||
BltVideoObjectFromIndex( uiRenderBuffer, guiHATCH, 0, sFaceX, sFaceY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
|
||||
if ( ( pSoldier->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
{
|
||||
// IF we are in the process of doing any deal/close animations, show face, not skill...
|
||||
@@ -2886,51 +2896,52 @@ void HandleAutoFaces( )
|
||||
pFace->fOldShowMoveHilight = FALSE;
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.fGettingHit && pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_STOP )
|
||||
{
|
||||
pSoldier->flags.fFlashPortrait = TRUE;
|
||||
pSoldier->bFlashPortraitFrame = FLASH_PORTRAIT_STARTSHADE;
|
||||
RESETTIMECOUNTER( pSoldier->timeCounters.PortraitFlashCounter, FLASH_PORTRAIT_DELAY );
|
||||
fRerender = TRUE;
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.fGettingHit && pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_STOP )
|
||||
if ( pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_START )
|
||||
{
|
||||
// Loop through flash values
|
||||
if ( TIMECOUNTERDONE( pSoldier->timeCounters.PortraitFlashCounter, FLASH_PORTRAIT_DELAY ) )
|
||||
{
|
||||
pSoldier->flags.fFlashPortrait = TRUE;
|
||||
pSoldier->bFlashPortraitFrame = FLASH_PORTRAIT_STARTSHADE;
|
||||
RESETTIMECOUNTER( pSoldier->timeCounters.PortraitFlashCounter, FLASH_PORTRAIT_DELAY );
|
||||
fRerender = TRUE;
|
||||
}
|
||||
if ( pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_START )
|
||||
{
|
||||
// Loop through flash values
|
||||
if ( TIMECOUNTERDONE( pSoldier->timeCounters.PortraitFlashCounter, FLASH_PORTRAIT_DELAY ) )
|
||||
pSoldier->bFlashPortraitFrame++;
|
||||
|
||||
if ( pSoldier->bFlashPortraitFrame > FLASH_PORTRAIT_ENDSHADE )
|
||||
{
|
||||
RESETTIMECOUNTER( pSoldier->timeCounters.PortraitFlashCounter, FLASH_PORTRAIT_DELAY );
|
||||
pSoldier->bFlashPortraitFrame++;
|
||||
pSoldier->bFlashPortraitFrame = FLASH_PORTRAIT_ENDSHADE;
|
||||
|
||||
if ( pSoldier->bFlashPortraitFrame > FLASH_PORTRAIT_ENDSHADE )
|
||||
if ( pSoldier->flags.fGettingHit )
|
||||
{
|
||||
pSoldier->bFlashPortraitFrame = FLASH_PORTRAIT_ENDSHADE;
|
||||
|
||||
if ( pSoldier->flags.fGettingHit )
|
||||
{
|
||||
pSoldier->flags.fFlashPortrait = FLASH_PORTRAIT_WAITING;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Render face again!
|
||||
pSoldier->flags.fFlashPortrait = FLASH_PORTRAIT_STOP;
|
||||
}
|
||||
|
||||
fRerender = TRUE;
|
||||
pSoldier->flags.fFlashPortrait = FLASH_PORTRAIT_WAITING;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Render face again!
|
||||
pSoldier->flags.fFlashPortrait = FLASH_PORTRAIT_STOP;
|
||||
}
|
||||
|
||||
fRerender = TRUE;
|
||||
}
|
||||
}
|
||||
// CHECK IF WE WERE WAITING FOR GETTING HIT TO FINISH!
|
||||
if ( !pSoldier->flags.fGettingHit && pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_WAITING )
|
||||
{
|
||||
pSoldier->flags.fFlashPortrait = FALSE;
|
||||
fRerender = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK IF WE WERE WAITING FOR GETTING HIT TO FINISH!
|
||||
if ( !pSoldier->flags.fGettingHit && pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_WAITING )
|
||||
{
|
||||
pSoldier->flags.fFlashPortrait = FALSE;
|
||||
fRerender = TRUE;
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_START )
|
||||
{
|
||||
fRerender = TRUE;
|
||||
}
|
||||
if ( pSoldier->flags.fFlashPortrait == FLASH_PORTRAIT_START )
|
||||
{
|
||||
fRerender = TRUE;
|
||||
}
|
||||
|
||||
if( pFace->uiFlags & FACE_REDRAW_WHOLE_FACE_NEXT_FRAME )
|
||||
{
|
||||
@@ -2939,20 +2950,24 @@ void HandleAutoFaces( )
|
||||
fRerender = TRUE;
|
||||
}
|
||||
|
||||
if ( fInterfacePanelDirty == DIRTYLEVEL2 && guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
if ( fInterfacePanelDirty == DIRTYLEVEL2 && guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
fRerender = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( fRerender )
|
||||
{
|
||||
RenderAutoFace( uiCount );
|
||||
RenderAutoFace( uiCount );
|
||||
}
|
||||
|
||||
if ( bLife < CONSCIOUSNESS )
|
||||
{
|
||||
fHandleFace = FALSE;
|
||||
}
|
||||
|
||||
// Flugente: frozen soldiers can't be selected
|
||||
if ( pSoldier->usSkillCooldown[SOLDIER_COOLDOWN_CRYO] )
|
||||
fHandleFace = FALSE;
|
||||
}
|
||||
|
||||
if ( fHandleFace )
|
||||
@@ -2961,11 +2976,8 @@ void HandleAutoFaces( )
|
||||
}
|
||||
|
||||
MouthAutoFace( uiCount );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HandleTalkingAutoFaces( )
|
||||
|
||||
Reference in New Issue
Block a user