mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merge branch 'master' into ExtraMercs
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Tactical All.h"
|
||||
#else
|
||||
#include "builddefines.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -50,7 +47,6 @@
|
||||
#include "ai.h" // added by Flugente
|
||||
#include "PreBattle Interface.h" // added by Flugente
|
||||
#include "Strategic Town Loyalty.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "Animation Control.h"
|
||||
|
||||
@@ -664,11 +660,7 @@ INT32 AddRottingCorpse( ROTTING_CORPSE_DEFINITION *pCorpseDef )
|
||||
for (ubLoop = 0; ubLoop < pDBStructureRef->pDBStructure->ubNumberOfTiles; ubLoop++)
|
||||
{
|
||||
ppTile = pDBStructureRef->ppTile;
|
||||
#if 0//dnl ch83 080114
|
||||
sTileGridNo = pCorpseDef->sGridNo + ppTile[ ubLoop ]->sPosRelToBase;
|
||||
#else
|
||||
sTileGridNo = AddPosRelToBase(pCorpseDef->sGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
//Remove blood
|
||||
RemoveBlood( sTileGridNo, pCorpseDef->bLevel );
|
||||
}
|
||||
@@ -1548,52 +1540,6 @@ ROTTING_CORPSE *FindCorpseBasedOnStructure( INT32 sGridNo, INT8 asLevel, STRUCT
|
||||
|
||||
void CorpseHit( INT32 sGridNo, INT8 asLevel, UINT16 usStructureID )
|
||||
{
|
||||
#if 0
|
||||
STRUCTURE *pStructure, *pBaseStructure;
|
||||
ROTTING_CORPSE *pCorpse = NULL;
|
||||
INT32 sBaseGridNo;
|
||||
|
||||
pStructure = FindStructureByID( sGridNo, usStructureID );
|
||||
|
||||
// Get base....
|
||||
pBaseStructure = FindBaseStructure( pStructure );
|
||||
|
||||
// Find base gridno...
|
||||
sBaseGridNo = pBaseStructure->sGridNo;
|
||||
|
||||
// Get corpse ID.....
|
||||
pCorpse = FindCorpseBasedOnStructure( sBaseGridNo, asLevel, pBaseStructure );
|
||||
|
||||
if ( pCorpse == NULL )
|
||||
{
|
||||
#ifdef JA2TESTVERSION
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Bullet hit corpse but corpse cannot be found at: %d", sBaseGridNo );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// Twitch the bugger...
|
||||
#ifdef JA2BETAVERSION
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Corpse hit" );
|
||||
#endif
|
||||
|
||||
if ( GridNoOnScreen( sBaseGridNo ) )
|
||||
{
|
||||
// Twitch....
|
||||
// Set frame...
|
||||
SetAniTileFrame( pCorpse->pAniTile, 1 );
|
||||
|
||||
// Go reverse...
|
||||
pCorpse->pAniTile->uiFlags |= ( ANITILE_BACKWARD | ANITILE_PAUSE_AFTER_LOOP );
|
||||
|
||||
// Turn off pause...
|
||||
pCorpse->pAniTile->uiFlags &= (~ANITILE_PAUSED);
|
||||
}
|
||||
|
||||
// PLay a sound....
|
||||
PlayJA2Sample( (UINT32)( BULLET_IMPACT_2 ), RATE_11025, SoundVolume( MIDVOLUME, sGridNo ), 1, SoundDir( sGridNo ) );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void VaporizeCorpse( INT32 sGridNo, INT8 asLevel, UINT16 usStructureID )
|
||||
@@ -2523,7 +2469,9 @@ void ReduceAmmoDroppedByNonPlayerSoldiers( SOLDIERTYPE *pSoldier, INT32 iInvSlot
|
||||
OBJECTTYPE *pObj = &( pSoldier->inv[ iInvSlot ] );
|
||||
|
||||
// if it's ammo
|
||||
if ( Item[ pObj->usItem ].usItemClass == IC_AMMO )
|
||||
if ( Item[ pObj->usItem ].usItemClass == IC_AMMO
|
||||
&& Magazine[Item[pObj->usItem].ubClassIndex].ubMagType != AMMO_BOX
|
||||
&& Magazine[Item[pObj->usItem].ubClassIndex].ubMagType != AMMO_CRATE)
|
||||
{
|
||||
//don't drop all the clips, just a random # of them between 1 and how many there are
|
||||
pObj->ubNumberOfObjects = ( UINT8 ) ( 1 + Random( pObj->ubNumberOfObjects ) );
|
||||
|
||||
Reference in New Issue
Block a user