- Added and fixed Boss death submission for random spawner.
- Added functions to FActorInfo that can set the damage factors and
pain chances to reduce the chance of new errors when working with
these features.
- Fixed: The handling of the deprecated FIRERESIST flag didn't work.
There were 3 problems:
* Actor defaults have no class information so HandleDeprecatedFlags
needs to be passed a pointer to the ActorInfo.
* The DamageFactors list is only created when needed so the code needs to
check if it already exists.
* damage factors are stored as fixed_t but this set a float.
- Added a traditional Strife color set for the automap.
SVN r1183 (trunk)
This commit is contained in:
parent
0e5587812e
commit
3638c658d6
7 changed files with 197 additions and 86 deletions
37
src/info.cpp
37
src/info.cpp
|
|
@ -293,6 +293,43 @@ FActorInfo *FActorInfo::GetReplacee ()
|
|||
return rep;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FActorInfo::SetDamageFactor(FName type, fixed_t factor)
|
||||
{
|
||||
if (factor != FRACUNIT)
|
||||
{
|
||||
if (DamageFactors == NULL) DamageFactors=new DmgFactors;
|
||||
DamageFactors->Insert(type, factor);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DamageFactors != NULL)
|
||||
DamageFactors->Remove(type);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FActorInfo::SetPainChance(FName type, int chance)
|
||||
{
|
||||
if (chance >= 0)
|
||||
{
|
||||
if (PainChances == NULL) PainChances=new PainChanceList;
|
||||
PainChances->Insert(type, MIN(chance, 255));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PainChances != NULL)
|
||||
PainChances->Remove(type);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue