- Changed: AInventory::Tick now only calls the super method if the item is not

owned. Having owned inventory items interact with the world is not supposed
  to happen.
- Fixed: case PCD_SECTORDAMAGE in p_acs.cpp was missing a terminating 'break'.
- Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.


SVN r1068 (trunk)
This commit is contained in:
Christoph Oelckers 2008-07-05 19:06:30 +00:00
parent ac4fb23c35
commit 448b8955c5
4 changed files with 31 additions and 2 deletions

View file

@ -1,4 +1,8 @@
July 5, 2008 (Changes by Graf Zahl)
- Changed: AInventory::Tick now only calls the super method if the item is not
owned. Having owned inventory items interact with the world is not supposed
to happen.
- Fixed: case PCD_SECTORDAMAGE in p_acs.cpp was missing a terminating 'break'.
- Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.
- Added a check for PUFFGETSOWNER to A_BFGSpray.
- Moved the PUFFGETSOWNER check into P_SpawnPuff and removed the limitation

View file

@ -446,7 +446,31 @@ END_DEFAULTS
void AInventory::Tick ()
{
if (Owner == NULL)
{
// AActor::Tick is only handling interaction with the world
// and we don't want that for owned inventory items.
Super::Tick ();
}
else if (tics != -1) // ... but at least we have to advance the states
{
tics--;
// you can cycle through multiple states in a tic
// [RH] Use <= 0 instead of == 0 so that spawnstates
// of 0 tics work as expected.
if (tics <= 0)
{
assert (state != NULL);
if (state == NULL)
{
Destroy();
return;
}
if (!SetState (state->GetNextState()))
return; // freed itself
}
}
if (DropTime)
{
if (--DropTime == 0)

View file

@ -5297,6 +5297,7 @@ int DLevelScript::RunScript ()
}
}
}
break;
case PCD_THINGDAMAGE2:
STACK(3) = P_Thing_Damage (STACK(3), activator, STACK(2), FName(FBehavior::StaticLookupString(STACK(1))));

View file

@ -1693,7 +1693,7 @@ void FMODSoundRenderer::SetSfxPaused(bool paused, int slot)
{
SFXPaused &= ~(1 << slot);
}
Printf("%d\n", SFXPaused);
//Printf("%d\n", SFXPaused);
if (oldslots != 0 && SFXPaused == 0)
{
PausableSfx->setPaused(false);