- new item flag NO_METAL_DETECTION (131072) makes mines an bombs undetectable via metal detector. Also works on action item bombs and mines. Sparing usage is advised.

- new item flag JUMP_GRENADE (262144) increases the explosion heigth of explosives, can be used to simulate bouncing grenades or jumping mines.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5656 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-10-29 23:08:44 +00:00
parent 14561917ec
commit 04278c7ad9
4 changed files with 17 additions and 5 deletions
+2 -1
View File
@@ -1069,7 +1069,8 @@ void DetermineMineDisplayInTile( INT32 sGridNo, INT8 bLevel, INT8& bMines, BOOLE
if (!((*pObj).fFlags & OBJECT_DISABLED_BOMB))
{
// we are looking for hostile mines and have got an detector equipped
if ( gubDrawModeMine == MINES_DRAW_DETECT_ENEMY && fWithMineDetector )
// some bombs cannot be found via metal detector
if ( gubDrawModeMine == MINES_DRAW_DETECT_ENEMY && fWithMineDetector && !( HasItemFlag(pObj->usItem, NO_METAL_DETECTION) || HasItemFlag((*pObj)[0]->data.misc.usBombItem, NO_METAL_DETECTION) ) )
{
// display all mines
bMines = MINE_BOMB;
+2 -1
View File
@@ -5389,7 +5389,8 @@ BOOLEAN NearbyGroundSeemsWrong( SOLDIERTYPE * pSoldier, INT32 sGridNo, BOOLEAN f
pObj = &( gWorldItems[ gWorldBombs[uiWorldBombIndex].iItemIndex ].object );
if ( (*pObj)[0]->data.misc.bDetonatorType == BOMB_PRESSURE && !((*pObj).fFlags & OBJECT_KNOWN_TO_BE_TRAPPED) && (!((*pObj).fFlags & OBJECT_DISABLED_BOMB)) )
{
if ( fMining && (*pObj)[0]->data.bTrap <= 10 )
// Flugente: some bombs cannot be found via metal detector
if ( fMining && (*pObj)[0]->data.bTrap <= 10 && !( HasItemFlag(pObj->usItem, NO_METAL_DETECTION) || HasItemFlag((*pObj)[0]->data.misc.usBombItem, NO_METAL_DETECTION) ) )
{
// add blue flag
AddBlueFlag( sNextGridNo, pSoldier->pathing.bLevel );
+3 -3
View File
@@ -747,9 +747,9 @@ extern OBJECTTYPE gTempObject;
#define CORPSE 0x00008000 //32768 // a dead body
#define SKIN_BLOODCAT 0x00010000 //65536 // retrieve this by skinning (=decapitating) a bloodcat
/*#define PLAYER_NET_2_LVL_1 0x00020000 //131072
#define PLAYER_NET_3_LVL_1 0x00040000 //262144
#define PLAYER_NET_4_LVL_1 0x00080000 //524288
#define NO_METAL_DETECTION 0x00020000 //131072 // a planted bomb with this flag can NOT be detected via metal detector. Use sparingly!
#define JUMP_GRENADE 0x00040000 //262144 // add +25 heigth to explosion, used for bouncing grenades and jumping mines
/*#define PLAYER_NET_4_LVL_1 0x00080000 //524288
#define PLAYER_NET_1_LVL_2 0x00100000 //1048576
#define PLAYER_NET_2_LVL_2 0x00200000 //2097152
+10
View File
@@ -337,6 +337,16 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32
}
// Callahan end
// Flugente: bouncing grenades/jumping mines explode from about waist heigth, so we add 25 to sZ. However, on order for this to work on roofs, we have to add another 50
// if on a roof, as heigth is only added if bLevel = 1 and sZ = 0
if ( HasItemFlag(usItem, JUMP_GRENADE) )
{
sZ += 25;
if ( bLevel )
sZ += ROOF_LEVEL_HEIGHT;
}
ExpParams.sX = sX;
ExpParams.sY = sY;
ExpParams.sZ = sZ;