- Increased the duration of respawn invulnerability by one second.

- DF2_YES_RESPAWN_INVUL and DF_FORCE_RESPAWN now apply to all multiplayer 
  games, not just deathmatch, without the need for turning on
  alwaysapplydmflags.
- Fixed: DF2_YES_RESPAWN_INVUL only worked in deathmatch, even with
  alwaysapplydmflags turned on.
- Fixed: DF_COOP_LOSE_ARMOR did not empty the starting armor items.
- Replaced the naive area sound implementation with one that takes into
  consideration the size and shape of the sector producing the sound. See
  the lifts on Doom 2 MAP30 and compare with previous versions.
- Fixed: The stop sound for sector-based sound sequences was not played with
  the CHAN_AREA flag.
- Removed the distinction between S_Sound() and S_SoundID() functions. Use
  S_Sound() for both names and IDs from now on.


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@123 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2008-06-15 17:17:31 +00:00
parent f6a34dbbe0
commit 513aeb87b8
67 changed files with 637 additions and 460 deletions

View file

@ -613,7 +613,7 @@ bool APlayerPawn::UseInventory (AInventory *item)
}
if (player == &players[consoleplayer])
{
S_SoundID (this, CHAN_ITEM, item->UseSound, 1, ATTN_NORM);
S_Sound (this, CHAN_ITEM, item->UseSound, 1, ATTN_NORM);
StatusBar->FlashItem (itemtype);
}
return true;
@ -754,8 +754,6 @@ void APlayerPawn::FilterCoopRespawnInventory (APlayerPawn *oldplayer)
return;
}
// If we don't want to lose anything, then we don't need to bother checking
// the old inventory.
if (dmflags & (DF_COOP_LOSE_KEYS |
DF_COOP_LOSE_WEAPONS |
DF_COOP_LOSE_AMMO |
@ -787,10 +785,24 @@ void APlayerPawn::FilterCoopRespawnInventory (APlayerPawn *oldplayer)
item->Destroy();
}
else if ((dmflags & DF_COOP_LOSE_ARMOR) &&
defitem == NULL &&
item->IsKindOf(RUNTIME_CLASS(AArmor)))
{
item->Destroy();
if (defitem != NULL)
{
item->Destroy();
}
else if (item->IsKindOf(RUNTIME_CLASS(ABasicArmor)))
{
static_cast<ABasicArmor*>(item)->SavePercent = static_cast<ABasicArmor*>(defitem)->SavePercent;
item->Amount = defitem->Amount;
}
else if (item->IsKindOf(RUNTIME_CLASS(AHexenArmor)))
{
static_cast<AHexenArmor*>(item)->Slots[0] = static_cast<AHexenArmor*>(defitem)->Slots[0];
static_cast<AHexenArmor*>(item)->Slots[1] = static_cast<AHexenArmor*>(defitem)->Slots[1];
static_cast<AHexenArmor*>(item)->Slots[2] = static_cast<AHexenArmor*>(defitem)->Slots[2];
static_cast<AHexenArmor*>(item)->Slots[3] = static_cast<AHexenArmor*>(defitem)->Slots[3];
}
}
else if ((dmflags & DF_COOP_LOSE_POWERUPS) &&
defitem == NULL &&
@ -1199,7 +1211,7 @@ void A_PlayerScream (AActor *self)
if (self->player == NULL || self->DeathSound != 0)
{
S_SoundID (self, CHAN_VOICE, self->DeathSound, 1, ATTN_NORM);
S_Sound (self, CHAN_VOICE, self->DeathSound, 1, ATTN_NORM);
return;
}
@ -1248,7 +1260,7 @@ void A_PlayerScream (AActor *self)
}
}
}
S_SoundID (self, chan, sound, 1, ATTN_NORM);
S_Sound (self, chan, sound, 1, ATTN_NORM);
}
@ -1859,7 +1871,7 @@ void P_DeathThink (player_t *player)
}
if ((player->cmd.ucmd.buttons & BT_USE ||
((deathmatch || alwaysapplydmflags) && (dmflags & DF_FORCE_RESPAWN))) && !(dmflags2 & DF2_NO_RESPAWN))
((multiplayer || alwaysapplydmflags) && (dmflags & DF_FORCE_RESPAWN))) && !(dmflags2 & DF2_NO_RESPAWN))
{
if (level.time >= player->respawn_time || ((player->cmd.ucmd.buttons & BT_USE) && !player->isbot))
{
@ -2192,7 +2204,7 @@ void P_PlayerThink (player_t *player)
int id = S_FindSkinnedSound (player->mo, "*falling");
if (id != 0 && !S_IsActorPlayingSomething (player->mo, CHAN_VOICE, id))
{
S_SoundID (player->mo, CHAN_VOICE, id, 1, ATTN_NORM);
S_Sound (player->mo, CHAN_VOICE, id, 1, ATTN_NORM);
}
}
// check for use