mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- reworked the tripwire nework flags. This will allow much more complex networks in the future. WARNING: planted tripwires in savegames from previous savegames will behave strangely with this version.
- externalised texts for cleaning, food, corpse handling and covert ops - tripwire can now be defused even if it does not have a blue flag. When having a wirecutter in the main hand, click on the planted tripwire while crouched, the defuse dialogue will show up. - corpses spawned from items will behave according to the zombie spawn rules - fixed a few glitches with the covert ops trait - fixed a bug that gave the 'mounted' bonus on a roof git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5546 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -287,6 +287,36 @@ INT32 FindWorldItemForBombInGridNo( INT32 sGridNo, INT8 bLevel )
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
// Flugente: is there a planted tripwire at this gridno? fKnown = TRUE: only return true if we know of that one already
|
||||
INT32 FindWorldItemForTripwireInGridNo( INT32 sGridNo, INT8 bLevel, BOOLEAN fKnown )
|
||||
{
|
||||
UINT32 uiBombIndex;
|
||||
OBJECTTYPE* pObj = NULL;
|
||||
|
||||
for (uiBombIndex = 0; uiBombIndex < guiNumWorldBombs; uiBombIndex++)
|
||||
{
|
||||
if (gWorldBombs[ uiBombIndex ].fExists && gWorldItems[ gWorldBombs[ uiBombIndex ].iItemIndex ].sGridNo == sGridNo && gWorldItems[ gWorldBombs[ uiBombIndex ].iItemIndex ].ubLevel == bLevel )
|
||||
{
|
||||
pObj = &( gWorldItems[ gWorldBombs[ uiBombIndex ].iItemIndex ].object );
|
||||
|
||||
if ( pObj && Item[pObj->usItem].tripwire )
|
||||
{
|
||||
if ( !fKnown )
|
||||
return( gWorldBombs[ uiBombIndex ].iItemIndex );
|
||||
|
||||
// owned by the player team - we know of this thing
|
||||
if ( (*pObj)[0]->data.ubWireNetworkFlag & TRIPWIRE_NETWORK_OWNER_PLAYER )
|
||||
return( gWorldBombs[ uiBombIndex ].iItemIndex );
|
||||
|
||||
// something is here, as a blue flag is planted
|
||||
if ( gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_PLAYER_MINE_PRESENT )
|
||||
return( gWorldBombs[ uiBombIndex ].iItemIndex );
|
||||
}
|
||||
}
|
||||
}
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
|
||||
void FindPanicBombsAndTriggers( void )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user