- Keep all damage factors in the table, even those that are 1.0.
- 256 is a valid pain chance, so clamp to that, not 255. SVN r2237 (trunk)
This commit is contained in:
parent
d1f9b94743
commit
0ca693771b
3 changed files with 6 additions and 11 deletions
13
src/info.cpp
13
src/info.cpp
|
|
@ -273,16 +273,11 @@ FActorInfo *FActorInfo::GetReplacee (bool lookskill)
|
|||
|
||||
void FActorInfo::SetDamageFactor(FName type, fixed_t factor)
|
||||
{
|
||||
if (factor != FRACUNIT)
|
||||
if (DamageFactors == NULL)
|
||||
{
|
||||
if (DamageFactors == NULL) DamageFactors=new DmgFactors;
|
||||
DamageFactors->Insert(type, factor);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DamageFactors != NULL)
|
||||
DamageFactors->Remove(type);
|
||||
DamageFactors = new DmgFactors;
|
||||
}
|
||||
DamageFactors->Insert(type, factor);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -295,7 +290,7 @@ void FActorInfo::SetPainChance(FName type, int chance)
|
|||
if (chance >= 0)
|
||||
{
|
||||
if (PainChances == NULL) PainChances=new PainChanceList;
|
||||
PainChances->Insert(type, MIN(chance, 255));
|
||||
PainChances->Insert(type, MIN(chance, 256));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue