- 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:
parent
ac4fb23c35
commit
448b8955c5
4 changed files with 31 additions and 2 deletions
|
|
@ -446,7 +446,31 @@ END_DEFAULTS
|
|||
|
||||
void AInventory::Tick ()
|
||||
{
|
||||
Super::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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue