mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- fixed an error that could cause clothes to spwan that were not worn
- upon shooting/stabbing someone, their vest/pants will get unusable. It can be taken off, but no item will appear. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5572 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3690,7 +3690,7 @@ BOOLEAN ActivateSurroundingTripwire( UINT8 ubID, INT32 sGridNo, INT8 bLevel, UIN
|
||||
if ( Item[usBombItem].tripwire == 1 )
|
||||
{
|
||||
// this is important - we have to check wether the wire has already been activated
|
||||
if ( ( (*pObj)[0]->data.sObjectFlag & TRIPWIRE_ACTIVATED ) == 0 )
|
||||
if ( ( (*pObj)[0]->data.sObjectFlag & CORPSE_NO_PANTS_AND_TRIPWIRE_ACTIVATED ) == 0 )
|
||||
{
|
||||
// determine this tripwire's flag
|
||||
UINT32 ubWireNetworkFlag = (*pObj)[0]->data.ubWireNetworkFlag;
|
||||
@@ -3740,7 +3740,7 @@ BOOLEAN ActivateSurroundingTripwire( UINT8 ubID, INT32 sGridNo, INT8 bLevel, UIN
|
||||
// Flugente hack: the tripwire will get removed in HandleExplosionQueue (it is still needed in there until the bomb gets called).
|
||||
// Because of this, ActivateSurroundingTripwire would normally find this wire again, thus a loop would occur.
|
||||
// So we mark the wire with this flag
|
||||
(*pObj)[0]->data.sObjectFlag |= TRIPWIRE_ACTIVATED;
|
||||
(*pObj)[0]->data.sObjectFlag |= CORPSE_NO_PANTS_AND_TRIPWIRE_ACTIVATED;
|
||||
|
||||
// activate surrounding tripwires, unless tripwire is too much damaged and we are unlucky..
|
||||
if ( (*pObj)[0]->data.objectStatus > (INT16)Random(50) )
|
||||
@@ -3910,7 +3910,7 @@ void HandleExplosionQueue( void )
|
||||
}
|
||||
|
||||
// delete the flag, otherwise wire will only work once
|
||||
(newtripwireObject)[0]->data.sObjectFlag &= ~TRIPWIRE_ACTIVATED;
|
||||
(newtripwireObject)[0]->data.sObjectFlag &= ~CORPSE_NO_PANTS_AND_TRIPWIRE_ACTIVATED;
|
||||
|
||||
// now add a tripwire item to the floor, simulating that activating tripwire deactivates it
|
||||
AddItemToPool( sGridNo, &newtripwireObject, 1, ubLevel, 0, -1 );
|
||||
@@ -3941,7 +3941,7 @@ void HandleExplosionQueue( void )
|
||||
}
|
||||
|
||||
// delete the flag, otherwise wire will only work once
|
||||
(newtripwireObject)[0]->data.sObjectFlag &= ~TRIPWIRE_ACTIVATED;
|
||||
(newtripwireObject)[0]->data.sObjectFlag &= ~CORPSE_NO_PANTS_AND_TRIPWIRE_ACTIVATED;
|
||||
|
||||
// now add a tripwire item to the floor, simulating that activating tripwire deactivates it
|
||||
AddItemToPool( sGridNo, &newtripwireObject, 1, ubLevel, 0, -1 );
|
||||
@@ -4425,7 +4425,7 @@ BOOLEAN SetOffBombsInGridNo( UINT8 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8
|
||||
// Flugente hack: the tripwire will get removed in HandleExplosionQueue (it is still needed in there until the bomb gets called).
|
||||
// Because of this, ActivateSurroundingTripwire would normally find this wire again, thus a loop would occur.
|
||||
// So we mark the wire with this flag
|
||||
(*pObj)[0]->data.sObjectFlag |= TRIPWIRE_ACTIVATED;
|
||||
(*pObj)[0]->data.sObjectFlag |= CORPSE_NO_PANTS_AND_TRIPWIRE_ACTIVATED;
|
||||
|
||||
// activate surrounding tripwires and tripwire-activated mines, unless tripwire is too much damaged and we are unlucky..
|
||||
if ( (*pObj)[0]->data.objectStatus > (INT16)Random(50) )
|
||||
|
||||
Reference in New Issue
Block a user