mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- Fixed: S_StopSound may not assume that after stopping a sound channel
its link to the next item in the list is still valid. - Fixed typo in src/CMakeLists.txt. - Fixed: Armor only worked for players. SVN r1489 (trunk)
This commit is contained in:
parent
ca454bfeb3
commit
18b4577bbd
4 changed files with 37 additions and 6 deletions
|
@ -1,4 +1,8 @@
|
|||
March 18, 2009 (Changes by Graf Zahl)
|
||||
- Fixed: S_StopSound may not assume that after stopping a sound channel
|
||||
its link to the next item in the list is still valid.
|
||||
- Fixed typo in src/CMakeLists.txt.
|
||||
- Fixed: Armor only worked for players.
|
||||
- Fixed: P_FindFloorCeiling may not call P_PointInSector if called from
|
||||
P_SpawnMapThing. It must use the values the actor has been initialized to
|
||||
by LinkToWorldForMapThing.
|
||||
|
|
|
@ -42,7 +42,7 @@ foreach( majver ${MAJOR_VERSIONS} )
|
|||
set( FMOD_LOCAL_INC_DIRS ${FMOD_LOCAL_INC_DIRS} "${dir}/api/inc" )
|
||||
set( FMOD_LOCAL_LIB_DIRS ${FMOD_LOCAL_LIB_DIRS} "${dir}/api/lib" )
|
||||
endforeach( dir ${FMOD_DIR_VERSIONS} )
|
||||
endforeach( majver ${MAJER_VERSIONS} )
|
||||
endforeach( majver ${MAJOR_VERSIONS} )
|
||||
|
||||
if( WIN32 )
|
||||
if( X64 )
|
||||
|
|
|
@ -1155,6 +1155,18 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
|
|||
}
|
||||
else
|
||||
{
|
||||
// Armor for monsters.
|
||||
if (!(flags & DMG_NO_ARMOR) && target->Inventory != NULL)
|
||||
{
|
||||
int newdam = damage;
|
||||
target->Inventory->AbsorbDamage (damage, mod, newdam);
|
||||
damage = newdam;
|
||||
if (damage <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
target->health -= damage;
|
||||
}
|
||||
|
||||
|
|
|
@ -1369,13 +1369,16 @@ bool S_CheckSoundLimit(sfxinfo_t *sfx, const FVector3 &pos, int near_limit, floa
|
|||
|
||||
void S_StopSound (int channel)
|
||||
{
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
FSoundChan *chan = Channels;
|
||||
while (chan != NULL)
|
||||
{
|
||||
FSoundChan *next = chan->NextChan;
|
||||
if (chan->SourceType == SOURCE_None &&
|
||||
(chan->EntChannel == channel || (i_compatflags & COMPATF_MAGICSILENCE)))
|
||||
{
|
||||
S_StopChannel(chan);
|
||||
}
|
||||
chan = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1389,14 +1392,17 @@ void S_StopSound (int channel)
|
|||
|
||||
void S_StopSound (AActor *actor, int channel)
|
||||
{
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
FSoundChan *chan = Channels;
|
||||
while (chan != NULL)
|
||||
{
|
||||
FSoundChan *next = chan->NextChan;
|
||||
if (chan->SourceType == SOURCE_Actor &&
|
||||
chan->Actor == actor &&
|
||||
(chan->EntChannel == channel || (i_compatflags & COMPATF_MAGICSILENCE)))
|
||||
{
|
||||
S_StopChannel(chan);
|
||||
}
|
||||
chan = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1410,14 +1416,17 @@ void S_StopSound (AActor *actor, int channel)
|
|||
|
||||
void S_StopSound (const sector_t *sec, int channel)
|
||||
{
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
FSoundChan *chan = Channels;
|
||||
while (chan != NULL)
|
||||
{
|
||||
FSoundChan *next = chan->NextChan;
|
||||
if (chan->SourceType == SOURCE_Sector &&
|
||||
chan->Sector == sec &&
|
||||
(chan->EntChannel == channel || (i_compatflags & COMPATF_MAGICSILENCE)))
|
||||
{
|
||||
S_StopChannel(chan);
|
||||
}
|
||||
chan = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1431,14 +1440,17 @@ void S_StopSound (const sector_t *sec, int channel)
|
|||
|
||||
void S_StopSound (const FPolyObj *poly, int channel)
|
||||
{
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
FSoundChan *chan = Channels;
|
||||
while (chan != NULL)
|
||||
{
|
||||
FSoundChan *next = chan->NextChan;
|
||||
if (chan->SourceType == SOURCE_Polyobj &&
|
||||
chan->Poly == poly &&
|
||||
(chan->EntChannel == channel || (i_compatflags & COMPATF_MAGICSILENCE)))
|
||||
{
|
||||
S_StopChannel(chan);
|
||||
}
|
||||
chan = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1475,8 +1487,10 @@ void S_RelinkSound (AActor *from, AActor *to)
|
|||
if (from == NULL)
|
||||
return;
|
||||
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
FSoundChan *chan = Channels;
|
||||
while (chan != NULL)
|
||||
{
|
||||
FSoundChan *next = chan->NextChan;
|
||||
if (chan->SourceType == SOURCE_Actor && chan->Actor == from)
|
||||
{
|
||||
if (to != NULL)
|
||||
|
@ -1496,6 +1510,7 @@ void S_RelinkSound (AActor *from, AActor *to)
|
|||
S_StopChannel(chan);
|
||||
}
|
||||
}
|
||||
chan = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue