- 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:
Flugente
2012-09-02 20:38:17 +00:00
parent da441439ac
commit 41bc80dc3c
25 changed files with 1028 additions and 170 deletions
+19 -2
View File
@@ -902,7 +902,12 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
}
else
{
pSoldier->EVENT_SoldierBeginCutFence( sAdjustedGridNo, ubDirection );
// Flugente: if we are trying to defuse a tripwire, call EVENT_SoldierDefuseTripwire() instead
INT32 tripwirefound = FindWorldItemForTripwireInGridNo( sGridNo, pSoldier->pathing.bLevel, TRUE );
if ( tripwirefound != -1 )
pSoldier->EVENT_SoldierDefuseTripwire( sGridNo, tripwirefound );
else
pSoldier->EVENT_SoldierBeginCutFence( sAdjustedGridNo, ubDirection );
}
@@ -1611,7 +1616,7 @@ void HandleSoldierDropBomb( SOLDIERTYPE *pSoldier, INT32 sGridNo )
pSoldier->inv[ HANDPOS ][0]->data.ubDirection = pSoldier->ubDirection;
// no frequency known... give a default value, so we don't defuse it by accident
gTempObject[0]->data.ubWireNetworkFlag = ENEMY_NET_1_LVL_1;
gTempObject[0]->data.ubWireNetworkFlag = (TRIPWIRE_NETWORK_OWNER_ENEMY|TRIPWIRE_NETWORK_NET_1|TRIPWIRE_NETWORK_LVL_1);
gTempObject[0]->data.bDefuseFrequency = 0;
// we now know there is something nasty here
@@ -1655,6 +1660,18 @@ void HandleSoldierUseCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel )
StartCorpseMessageBox( pSoldier, sGridNo, bLevel );
}
void HandleSoldierDefuseTripwire( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT32 sItem )
{
gpBoobyTrapItemPool = GetItemPoolForIndex( sGridNo, sItem, pSoldier->pathing.bLevel );
gpBoobyTrapSoldier = pSoldier;
gsBoobyTrapGridNo = sGridNo;
gbBoobyTrapLevel = pSoldier->pathing.bLevel;
gfDisarmingBuriedBomb = FALSE;
gbTrapDifficulty = (gWorldItems[ sItem ].object)[0]->data.bTrap;
DoMessageBox( MSG_BOX_BASIC_STYLE, TacticalStr[ DISARM_BOOBYTRAP_PROMPT ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, BoobyTrapMessageBoxCallBack, NULL );
}
void SoldierHandleDropItem( SOLDIERTYPE *pSoldier )
{
// LOOK IN PANDING DATA FOR ITEM TO DROP, AND LOCATION