mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New item tag: mines with <antitankmine> set to 1 will be activated by vehicles or robots.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4529,6 +4529,14 @@ BOOLEAN SetOffBombsInGridNo( UINT8 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8
|
||||
{
|
||||
if (fAllBombs || (*pObj)[0]->data.misc.bDetonatorType == BOMB_PRESSURE)
|
||||
{
|
||||
// Flugente: if this is a anti-tank mine, only detonate it if the person triggering it is (in) a vehicle, or if we detonate everything unconditional
|
||||
if ( !fAllBombs && ubID != NOBODY && Item[pObj->usItem].antitankmine )
|
||||
{
|
||||
// if this is not a vehicle, not a robot and not a tank, don't activate
|
||||
if ( !(MercPtrs[ubID]->flags.uiStatusFlags & SOLDIER_VEHICLE) && !AM_A_ROBOT( MercPtrs[ubID] ) && !TANK( MercPtrs[ubID] ) )
|
||||
continue;
|
||||
}
|
||||
|
||||
// Snap: if we do set off our own trap (e.g. by trying to disarm it), we pay!
|
||||
/*if (!fAllBombs && MercPtrs[ ubID ]->bTeam != gbPlayerNum )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user