mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- bug fix: Smoke grenade has the same effect as mustard gas grenade (need to run in gas cloud to reproduce)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@365 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.362" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.365" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
INT8 czVersionNumber[16] = { "Build 06.07.20" };
|
||||
INT8 czVersionNumber[16] = { "Build 06.07.22" };
|
||||
INT16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib"
|
||||
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_debug_v1.13.348_2006_07_17.exe"
|
||||
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_debug_v1.13.365_2006_07_22.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||
@@ -546,7 +546,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
|
||||
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_v1.13.348_2006_07_17.exe"
|
||||
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_v1.13.365_2006_07_22.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||
|
||||
+93
-70
@@ -1815,10 +1815,10 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
pSoldier->bBreathCollapsed = TRUE;
|
||||
pSoldier->bEndDoorOpenCode = FALSE;
|
||||
|
||||
if ( fInitialMove )
|
||||
{
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
}
|
||||
if ( fInitialMove )
|
||||
{
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
}
|
||||
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("HandleGotoNewGridNo() Failed: Out of Breath") );
|
||||
return( FALSE );
|
||||
@@ -1930,7 +1930,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
(*pfKeepMoving ) = FALSE;
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
// OK, open!
|
||||
StartInteractiveObject( sDoorGridNo, pStructure->usStructureID, pSoldier, bDirection );
|
||||
InteractWithInteractiveObject( pSoldier, pStructure, bDirection );
|
||||
@@ -1955,11 +1955,11 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
{
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "HandleGotoNewGridNo() Failed: Tile %d Was blocked", usNewGridNo ) );
|
||||
|
||||
// ATE: If our own guy and an initial move.. display message
|
||||
//if ( fInitialMove && pSoldier->bTeam == gbPlayerNum )
|
||||
//{
|
||||
// ATE: If our own guy and an initial move.. display message
|
||||
//if ( fInitialMove && pSoldier->bTeam == gbPlayerNum )
|
||||
//{
|
||||
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[ NO_PATH_FOR_MERC ], pSoldier->name );
|
||||
//}
|
||||
//}
|
||||
|
||||
pSoldier->bEndDoorOpenCode = FALSE;
|
||||
// GO on to next guy!
|
||||
@@ -1976,27 +1976,27 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
// we find something by metal detector... we should definitely stop
|
||||
// but we won't place a locator or say anything
|
||||
|
||||
// IF not in combat, stop them all
|
||||
if ( !( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
{
|
||||
INT32 cnt2;
|
||||
SOLDIERTYPE *pSoldier2;
|
||||
// IF not in combat, stop them all
|
||||
if ( !( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
{
|
||||
INT32 cnt2;
|
||||
SOLDIERTYPE *pSoldier2;
|
||||
|
||||
cnt2 = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||
cnt2 = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||
|
||||
// look for all mercs on the same team,
|
||||
for ( pSoldier2 = MercPtrs[ cnt2 ]; cnt2 >= gTacticalStatus.Team[ gbPlayerNum ].bFirstID; cnt2-- ,pSoldier2-- )
|
||||
{
|
||||
if ( pSoldier2->bActive )
|
||||
{
|
||||
EVENT_StopMerc( pSoldier2, pSoldier2->sGridNo, pSoldier2->bDirection );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
}
|
||||
// look for all mercs on the same team,
|
||||
for ( pSoldier2 = MercPtrs[ cnt2 ]; cnt2 >= gTacticalStatus.Team[ gbPlayerNum ].bFirstID; cnt2-- ,pSoldier2-- )
|
||||
{
|
||||
if ( pSoldier2->bActive )
|
||||
{
|
||||
EVENT_StopMerc( pSoldier2, pSoldier2->sGridNo, pSoldier2->bDirection );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
}
|
||||
|
||||
(*pfKeepMoving) = FALSE;
|
||||
|
||||
@@ -2044,7 +2044,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
}
|
||||
//else if ( gTacticalStatus.fEnemySightingOnTheirTurn )
|
||||
//{
|
||||
// Hault guy!
|
||||
// Hault guy!
|
||||
// AdjustNoAPToFinishMove( pSoldier, TRUE );
|
||||
// (*pfKeepMoving ) = FALSE;
|
||||
//}
|
||||
@@ -2061,7 +2061,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & ANY_SMOKE_EFFECT && PreRandom( 5 ) == 0 )
|
||||
{
|
||||
EXPLOSIVETYPE * pExplosive = NULL;
|
||||
INT8 bPosOfMask;
|
||||
INT8 bPosOfMask;
|
||||
|
||||
bPosOfMask = FindGasMask (pSoldier);
|
||||
//if ( pSoldier->inv[ HEAD1POS ].usItem == GASMASK && pSoldier->inv[ HEAD1POS ].bStatus[0] >= GASMASK_MIN_STATUS )
|
||||
@@ -2077,14 +2077,24 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
// bPosOfMask = NO_SLOT;
|
||||
//}
|
||||
|
||||
// TODO: Madd: This next section is pretty lame because it can't figure out which explosive was used to actually cause a gas effect
|
||||
// TODO: Madd: This next section is pretty lame because it can't figure out which explosive was used to actually cause a gas effect
|
||||
// so for now, the first explosive to use a gas effect decides the health and breath damage for all of the gasses of that type
|
||||
// (this was hard coded before by the developers - i guess they figured they didn't need to look for the actual explosion item,
|
||||
// since they only had one of each gas item?!?)
|
||||
// anyway, it means that we can only have one set of health/breath damage values for each gas type, until someone has time
|
||||
// to dig into this further and actually make it find the original item that caused the gas
|
||||
if ( !AM_A_ROBOT( pSoldier ) )
|
||||
{
|
||||
if ( !AM_A_ROBOT( pSoldier ) )
|
||||
{
|
||||
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_SMOKE )
|
||||
{
|
||||
if ( bPosOfMask == NO_SLOT )
|
||||
{
|
||||
pExplosive = &( Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_SMOKE) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_TEARGAS )
|
||||
{
|
||||
if ( !(pSoldier->fHitByGasFlags & HIT_BY_TEARGAS) && bPosOfMask == NO_SLOT )
|
||||
@@ -2092,6 +2102,8 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
pExplosive = &( Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_TEARGAS) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_MUSTARDGAS )
|
||||
{
|
||||
if ( !(pSoldier->fHitByGasFlags & HIT_BY_MUSTARDGAS) && bPosOfMask == NO_SLOT )
|
||||
@@ -2100,6 +2112,8 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_CREATUREGAS )
|
||||
{
|
||||
if ( !(pSoldier->fHitByGasFlags & HIT_BY_CREATUREGAS) ) // gas mask doesn't help vs creaturegas
|
||||
@@ -2107,6 +2121,8 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_CREATUREGAS) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_BURNABLEGAS )
|
||||
{
|
||||
if ( !(pSoldier->fHitByGasFlags & HIT_BY_BURNABLEGAS) )
|
||||
@@ -2114,14 +2130,21 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_BURNABLEGAS) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
if ( pExplosive )
|
||||
{
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
fDontContinue = TRUE;
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pSoldier->fHitByGasFlags: %d", pSoldier->fHitByGasFlags );
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
|
||||
DishOutGasDamage( pSoldier, pExplosive, TRUE, FALSE,
|
||||
(INT16) (pExplosive->ubDamage + (UINT8)PreRandom( pExplosive->ubDamage ) ),
|
||||
(INT16) (100 * ( pExplosive->ubStunDamage + (INT16)PreRandom( ( pExplosive->ubStunDamage / 2 ) ) ) ), NOBODY );
|
||||
if ( !(gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_SMOKE ))
|
||||
{
|
||||
if ( pExplosive )
|
||||
{
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
fDontContinue = TRUE;
|
||||
|
||||
DishOutGasDamage( pSoldier, pExplosive, TRUE, FALSE,
|
||||
(INT16) (pExplosive->ubDamage + (UINT8)PreRandom( pExplosive->ubDamage ) ),
|
||||
(INT16) (100 * ( pExplosive->ubStunDamage + (INT16)PreRandom( ( pExplosive->ubStunDamage / 2 ) ) ) ), NOBODY );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2151,7 +2174,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
}
|
||||
|
||||
if ( (pSoldier->bBlindedCounter > 0) && (pSoldier->usAnimState == RUNNING) && (Random( 5 ) == 0) &&
|
||||
OKFallDirection( pSoldier, (INT16) (pSoldier->sGridNo + DirectionInc( pSoldier->bDirection ) ), pSoldier->bLevel, pSoldier->bDirection, pSoldier->usAnimState ) )
|
||||
OKFallDirection( pSoldier, (INT16) (pSoldier->sGridNo + DirectionInc( pSoldier->bDirection ) ), pSoldier->bLevel, pSoldier->bDirection, pSoldier->usAnimState ) )
|
||||
{
|
||||
// 20% chance of falling over!
|
||||
DoMercBattleSound( pSoldier, BATTLE_SOUND_CURSE1 );
|
||||
@@ -2164,7 +2187,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
return( FALSE );
|
||||
}
|
||||
else if ( ( GetDrunkLevel( pSoldier ) == DRUNK ) && (Random( 5 ) == 0) &&
|
||||
OKFallDirection( pSoldier, (INT16) (pSoldier->sGridNo + DirectionInc( pSoldier->bDirection ) ), pSoldier->bLevel, pSoldier->bDirection, pSoldier->usAnimState ) )
|
||||
OKFallDirection( pSoldier, (INT16) (pSoldier->sGridNo + DirectionInc( pSoldier->bDirection ) ), pSoldier->bLevel, pSoldier->bDirection, pSoldier->usAnimState ) )
|
||||
{
|
||||
// 20% chance of falling over!
|
||||
DoMercBattleSound( pSoldier, BATTLE_SOUND_CURSE1 );
|
||||
@@ -2177,35 +2200,35 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
return( FALSE );
|
||||
}
|
||||
else
|
||||
// ATE; First check for profile
|
||||
// Forgetful guy might forget his path
|
||||
if ( (pSoldier->bTeam == gbPlayerNum) && ( pSoldier->ubProfile != NO_PROFILE ) && gMercProfiles[pSoldier->ubProfile].bPersonalityTrait == FORGETFUL )
|
||||
{
|
||||
if ( pSoldier->ubNumTilesMovesSinceLastForget < 255 )
|
||||
// ATE; First check for profile
|
||||
// Forgetful guy might forget his path
|
||||
if ( (pSoldier->bTeam == gbPlayerNum) && ( pSoldier->ubProfile != NO_PROFILE ) && gMercProfiles[pSoldier->ubProfile].bPersonalityTrait == FORGETFUL )
|
||||
{
|
||||
pSoldier->ubNumTilesMovesSinceLastForget++;
|
||||
}
|
||||
|
||||
if ( pSoldier->usPathIndex > 2 && (Random( 100 ) == 0) && pSoldier->ubNumTilesMovesSinceLastForget > 200 )
|
||||
{
|
||||
pSoldier->ubNumTilesMovesSinceLastForget = 0;
|
||||
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
if (pSoldier->bActionPoints > 0)
|
||||
if ( pSoldier->ubNumTilesMovesSinceLastForget < 255 )
|
||||
{
|
||||
pSoldier->bActionPoints -= (INT8) (Random( pSoldier->bActionPoints ) + 1);
|
||||
pSoldier->ubNumTilesMovesSinceLastForget++;
|
||||
}
|
||||
|
||||
fDontContinue = TRUE;
|
||||
if ( pSoldier->usPathIndex > 2 && (Random( 100 ) == 0) && pSoldier->ubNumTilesMovesSinceLastForget > 200 )
|
||||
{
|
||||
pSoldier->ubNumTilesMovesSinceLastForget = 0;
|
||||
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
if (pSoldier->bActionPoints > 0)
|
||||
{
|
||||
pSoldier->bActionPoints -= (INT8) (Random( pSoldier->bActionPoints ) + 1);
|
||||
}
|
||||
|
||||
fDontContinue = TRUE;
|
||||
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( !fDontContinue )
|
||||
{
|
||||
// Don't apply the first deduction in points...
|
||||
@@ -2227,14 +2250,14 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
{
|
||||
pSoldier->bReverse = TRUE;
|
||||
|
||||
if ( pSoldier->ubBodyType == INFANT_MONSTER )
|
||||
{
|
||||
ChangeSoldierState( pSoldier, WALK_BACKWARDS, 1, TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeSoldierState( pSoldier, MONSTER_WALK_BACKWARDS, 1, TRUE );
|
||||
}
|
||||
if ( pSoldier->ubBodyType == INFANT_MONSTER )
|
||||
{
|
||||
ChangeSoldierState( pSoldier, WALK_BACKWARDS, 1, TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeSoldierState( pSoldier, MONSTER_WALK_BACKWARDS, 1, TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2701,7 +2701,7 @@ void SetSoldierGridNo( SOLDIERTYPE *pSoldier, INT16 sNewGridNo, BOOLEAN fForceRe
|
||||
}
|
||||
|
||||
// are we now standing in tear gas without a decently working gas mask?
|
||||
if ( GetSmokeEffectOnTile( sNewGridNo, pSoldier->bLevel ) )
|
||||
if ( GetSmokeEffectOnTile( sNewGridNo, pSoldier->bLevel ) > 1 ) //lal: removed normal smoke
|
||||
{
|
||||
BOOLEAN fSetGassed = TRUE;
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ enum
|
||||
{
|
||||
HIT_BY_TEARGAS = 0x01,
|
||||
HIT_BY_MUSTARDGAS = 0x02,
|
||||
HIT_BY_CREATUREGAS = 0x04,
|
||||
HIT_BY_CREATUREGAS = 0x04,
|
||||
HIT_BY_BURNABLEGAS = 0x08,
|
||||
};
|
||||
|
||||
|
||||
@@ -1504,8 +1504,12 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"ExpControl pSoldier->fHitByGasFlags: %d", pSoldier->fHitByGasFlags );
|
||||
|
||||
// a gas effect, take damage directly...
|
||||
SoldierTakeDamage( pSoldier, ANIM_STAND, sWoundAmt, sBreathAmt, TAKE_DAMAGE_GAS, NOBODY, NOWHERE, 0, TRUE );
|
||||
|
||||
if ( pSoldier->bLife >= CONSCIOUSNESS )
|
||||
{
|
||||
DoMercBattleSound( pSoldier, (INT8)( BATTLE_SOUND_HIT1 + Random( 2 ) ) );
|
||||
|
||||
@@ -109,14 +109,14 @@ INT8 FromWorldFlagsToSmokeType( UINT8 ubWorldFlags )
|
||||
{
|
||||
return( MUSTARDGAS_SMOKE_EFFECT );
|
||||
}
|
||||
else if ( ubWorldFlags & MAPELEMENT_EXT_BURNABLEGAS )
|
||||
{
|
||||
return( BURNABLEGAS_SMOKE_EFFECT );
|
||||
}
|
||||
else if ( ubWorldFlags & MAPELEMENT_EXT_CREATUREGAS )
|
||||
{
|
||||
return( CREATURE_SMOKE_EFFECT );
|
||||
}
|
||||
else if ( ubWorldFlags & MAPELEMENT_EXT_BURNABLEGAS )
|
||||
{
|
||||
return( BURNABLEGAS_SMOKE_EFFECT );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( NO_SMOKE_EFFECT );
|
||||
|
||||
@@ -490,7 +490,7 @@ void UpdateAniTiles( )
|
||||
if ( (uiClock - pNode->uiTimeLastUpdate ) > (UINT32)pNode->sDelay && !( pNode->uiFlags & ANITILE_PAUSED ) )
|
||||
{
|
||||
pNode->uiTimeLastUpdate = GetJA2Clock( );
|
||||
|
||||
|
||||
if ( pNode->uiFlags & ( ANITILE_OPTIMIZEFORSLOWMOVING ) )
|
||||
{
|
||||
pNode->pLevelNode->uiFlags |= (LEVELNODE_DYNAMIC );
|
||||
@@ -498,7 +498,7 @@ void UpdateAniTiles( )
|
||||
}
|
||||
else if ( pNode->uiFlags & ( ANITILE_OPTIMIZEFORSMOKEEFFECT ) )
|
||||
{
|
||||
// pNode->pLevelNode->uiFlags |= LEVELNODE_DYNAMICZ;
|
||||
// pNode->pLevelNode->uiFlags |= LEVELNODE_DYNAMICZ;
|
||||
ResetSpecificLayerOptimizing( TILES_DYNAMIC_STRUCTURES );
|
||||
pNode->pLevelNode->uiFlags &= (~LEVELNODE_LASTDYNAMIC);
|
||||
pNode->pLevelNode->uiFlags |= (LEVELNODE_DYNAMIC );
|
||||
@@ -536,20 +536,20 @@ void UpdateAniTiles( )
|
||||
{
|
||||
switch( pNode->uiKeyFrame1Code )
|
||||
{
|
||||
case ANI_KEYFRAME_BEGIN_TRANSLUCENCY:
|
||||
case ANI_KEYFRAME_BEGIN_TRANSLUCENCY:
|
||||
|
||||
pNode->pLevelNode->uiFlags |= LEVELNODE_REVEAL;
|
||||
break;
|
||||
pNode->pLevelNode->uiFlags |= LEVELNODE_REVEAL;
|
||||
break;
|
||||
|
||||
case ANI_KEYFRAME_CHAIN_WATER_EXPLOSION:
|
||||
|
||||
IgniteExplosion( pNode->ubUserData2, pNode->pLevelNode->sRelativeX, pNode->pLevelNode->sRelativeY, 0, pNode->sGridNo, (UINT16)( pNode->uiUserData ), 0 );
|
||||
break;
|
||||
case ANI_KEYFRAME_CHAIN_WATER_EXPLOSION:
|
||||
|
||||
case ANI_KEYFRAME_DO_SOUND:
|
||||
IgniteExplosion( pNode->ubUserData2, pNode->pLevelNode->sRelativeX, pNode->pLevelNode->sRelativeY, 0, pNode->sGridNo, (UINT16)( pNode->uiUserData ), 0 );
|
||||
break;
|
||||
|
||||
PlayJA2Sample( pNode->uiUserData, RATE_11025, SoundVolume( MIDVOLUME, (INT16)pNode->uiUserData3 ), 1, SoundDir( (INT16)pNode->uiUserData3 ) );
|
||||
break;
|
||||
case ANI_KEYFRAME_DO_SOUND:
|
||||
|
||||
PlayJA2Sample( pNode->uiUserData, RATE_11025, SoundVolume( MIDVOLUME, (INT16)pNode->uiUserData3 ), 1, SoundDir( (INT16)pNode->uiUserData3 ) );
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -557,29 +557,29 @@ void UpdateAniTiles( )
|
||||
// CHECK IF WE SHOULD BE DISPLAYING TRANSLUCENTLY!
|
||||
if ( pNode->sCurrentFrame == pNode->ubKeyFrame2 )
|
||||
{
|
||||
UINT8 ubExpType;
|
||||
UINT8 ubExpType;
|
||||
|
||||
switch( pNode->uiKeyFrame2Code )
|
||||
switch( pNode->uiKeyFrame2Code )
|
||||
{
|
||||
case ANI_KEYFRAME_BEGIN_DAMAGE:
|
||||
case ANI_KEYFRAME_BEGIN_DAMAGE:
|
||||
|
||||
ubExpType = Explosive[ Item[ (UINT16)pNode->uiUserData ].ubClassIndex ].ubType;
|
||||
ubExpType = Explosive[ Item[ (UINT16)pNode->uiUserData ].ubClassIndex ].ubType;
|
||||
|
||||
// if ( ubExpType == EXPLOSV_TEARGAS || ubExpType == EXPLOSV_MUSTGAS ||
|
||||
// ubExpType == EXPLOSV_SMOKE )
|
||||
if ( ubExpType == EXPLOSV_TEARGAS || ubExpType == EXPLOSV_MUSTGAS ||
|
||||
ubExpType == EXPLOSV_SMOKE || ubExpType == EXPLOSV_BURNABLEGAS )
|
||||
{
|
||||
// Do sound....
|
||||
// PlayJA2Sample( AIR_ESCAPING_1, RATE_11025, SoundVolume( HIGHVOLUME, pNode->sGridNo ), 1, SoundDir( pNode->sGridNo ) );
|
||||
NewSmokeEffect( pNode->sGridNo, (UINT16)pNode->uiUserData, gExplosionData[ pNode->uiUserData3 ].Params.bLevel, (UINT8)pNode->ubUserData2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
SpreadEffect( pNode->sGridNo, Explosive[ Item[ (UINT16)pNode->uiUserData ].ubClassIndex ].ubRadius, (UINT16)pNode->uiUserData, (UINT8)pNode->ubUserData2, FALSE, gExplosionData[ pNode->uiUserData3 ].Params.bLevel, -1 );
|
||||
}
|
||||
// Forfait any other animations this frame....
|
||||
return;
|
||||
// if ( ubExpType == EXPLOSV_TEARGAS || ubExpType == EXPLOSV_MUSTGAS ||
|
||||
// ubExpType == EXPLOSV_SMOKE )
|
||||
if ( ubExpType == EXPLOSV_TEARGAS || ubExpType == EXPLOSV_MUSTGAS ||
|
||||
ubExpType == EXPLOSV_SMOKE || ubExpType == EXPLOSV_BURNABLEGAS )
|
||||
{
|
||||
// Do sound....
|
||||
// PlayJA2Sample( AIR_ESCAPING_1, RATE_11025, SoundVolume( HIGHVOLUME, pNode->sGridNo ), 1, SoundDir( pNode->sGridNo ) );
|
||||
NewSmokeEffect( pNode->sGridNo, (UINT16)pNode->uiUserData, gExplosionData[ pNode->uiUserData3 ].Params.bLevel, (UINT8)pNode->ubUserData2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
SpreadEffect( pNode->sGridNo, Explosive[ Item[ (UINT16)pNode->uiUserData ].ubClassIndex ].ubRadius, (UINT16)pNode->uiUserData, (UINT8)pNode->ubUserData2, FALSE, gExplosionData[ pNode->uiUserData3 ].Params.bLevel, -1 );
|
||||
}
|
||||
// Forfait any other animations this frame....
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -629,7 +629,7 @@ void UpdateAniTiles( )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( pNode->uiFlags & ANITILE_BACKWARD )
|
||||
{
|
||||
if ( pNode->uiFlags & ANITILE_ERASEITEMFROMSAVEBUFFFER )
|
||||
@@ -734,7 +734,7 @@ void UpdateAniTiles( )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
#define MAPELEMENT_EXT_NOBURN_STRUCT 0x20
|
||||
#define MAPELEMENT_EXT_ROOFCODE_VISITED 0x40
|
||||
#define MAPELEMENT_EXT_CREATUREGAS 0x80
|
||||
#define MAPELEMENT_EXT_BURNABLEGAS 0x81
|
||||
#define MAPELEMENT_EXT_BURNABLEGAS 0x60
|
||||
|
||||
#define FIRST_LEVEL 0
|
||||
#define SECOND_LEVEL 1
|
||||
|
||||
Reference in New Issue
Block a user