- 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
+24 -4
View File
@@ -7843,12 +7843,32 @@ BOOLEAN ArmBomb( OBJECTTYPE * pObj, INT8 bSetting )
UINT32 ubWireNetworkFlag = 0;
if ( Item[pObj->usItem].tripwire == 1 && bSetting > 0 && bSetting < 17 ) // checks for safety
{
// we are placing it, so it's ours
ubWireNetworkFlag |= TRIPWIRE_NETWORK_OWNER_PLAYER;
// the bSetting consists of the network number + 4 * (network hierarchy - 1)
INT8 netnr = bSetting % 4;
INT8 hierarchytimesfour = bSetting - netnr;
// account for placement by the enemy
INT8 editoradj = 16;
//if ( editor ) editoradj = 0; or something like that
ubWireNetworkFlag = 1 << (editoradj - 1 + bSetting);
if ( 1 == netnr )
ubWireNetworkFlag |= TRIPWIRE_NETWORK_NET_1;
else if ( 2 == netnr )
ubWireNetworkFlag |= TRIPWIRE_NETWORK_NET_2;
else if ( 3 == netnr )
ubWireNetworkFlag |= TRIPWIRE_NETWORK_NET_3;
else
ubWireNetworkFlag |= TRIPWIRE_NETWORK_NET_4;
if ( 0 == hierarchytimesfour )
ubWireNetworkFlag |= TRIPWIRE_NETWORK_LVL_1;
else if ( 1 == hierarchytimesfour )
ubWireNetworkFlag |= TRIPWIRE_NETWORK_LVL_2;
else if ( 2 == hierarchytimesfour )
ubWireNetworkFlag |= TRIPWIRE_NETWORK_LVL_3;
else
ubWireNetworkFlag |= TRIPWIRE_NETWORK_LVL_4;
// TOOD: once tripwire can be placed in the editor, this has to be altered
}
if (fDefuse) // TODO: doesn't work this way if both a detonator and a remote defuse is attached...