mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
- floatified the last remaining AActor member variable 'damagemultiply'.
This commit is contained in:
parent
1125101b37
commit
2cf3b20ea8
4 changed files with 6 additions and 6 deletions
|
@ -1290,7 +1290,7 @@ public:
|
||||||
FNameNoInit DamageType;
|
FNameNoInit DamageType;
|
||||||
FNameNoInit DamageTypeReceived;
|
FNameNoInit DamageTypeReceived;
|
||||||
double DamageFactor;
|
double DamageFactor;
|
||||||
fixed_t DamageMultiply;
|
double DamageMultiply;
|
||||||
|
|
||||||
FNameNoInit PainType;
|
FNameNoInit PainType;
|
||||||
FNameNoInit DeathType;
|
FNameNoInit DeathType;
|
||||||
|
|
|
@ -3964,7 +3964,7 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APROP_DamageMultiplier:
|
case APROP_DamageMultiplier:
|
||||||
actor->DamageMultiply = value;
|
actor->DamageMultiply = ACSToDouble(value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APROP_MasterTID:
|
case APROP_MasterTID:
|
||||||
|
@ -4044,7 +4044,7 @@ int DLevelScript::GetActorProperty (int tid, int property)
|
||||||
case APROP_Speed: return DoubleToACS(actor->Speed);
|
case APROP_Speed: return DoubleToACS(actor->Speed);
|
||||||
case APROP_Damage: return actor->GetMissileDamage(0,1);
|
case APROP_Damage: return actor->GetMissileDamage(0,1);
|
||||||
case APROP_DamageFactor:return DoubleToACS(actor->DamageFactor);
|
case APROP_DamageFactor:return DoubleToACS(actor->DamageFactor);
|
||||||
case APROP_DamageMultiplier: return actor->DamageMultiply;
|
case APROP_DamageMultiplier: return DoubleToACS(actor->DamageMultiply);
|
||||||
case APROP_Alpha: return DoubleToACS(actor->Alpha);
|
case APROP_Alpha: return DoubleToACS(actor->Alpha);
|
||||||
case APROP_RenderStyle: for (int style = STYLE_None; style < STYLE_Count; ++style)
|
case APROP_RenderStyle: for (int style = STYLE_None; style < STYLE_Count; ++style)
|
||||||
{ // Check for a legacy render style that matches.
|
{ // Check for a legacy render style that matches.
|
||||||
|
|
|
@ -1076,7 +1076,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
||||||
|
|
||||||
if (damage > 0 && source != NULL)
|
if (damage > 0 && source != NULL)
|
||||||
{
|
{
|
||||||
damage = FixedMul(damage, source->DamageMultiply);
|
damage = int(damage * source->DamageMultiply);
|
||||||
|
|
||||||
// Handle active damage modifiers (e.g. PowerDamage)
|
// Handle active damage modifiers (e.g. PowerDamage)
|
||||||
if (damage > 0 && source->Inventory != NULL)
|
if (damage > 0 && source->Inventory != NULL)
|
||||||
|
|
|
@ -410,7 +410,7 @@ void AActor::Serialize(FArchive &arc)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DamageMultiply = FRACUNIT;
|
DamageMultiply = 1.;
|
||||||
}
|
}
|
||||||
arc << WeaveIndexXY << WeaveIndexZ
|
arc << WeaveIndexXY << WeaveIndexZ
|
||||||
<< PoisonDamageReceived << PoisonDurationReceived << PoisonPeriodReceived << Poisoner
|
<< PoisonDamageReceived << PoisonDurationReceived << PoisonPeriodReceived << Poisoner
|
||||||
|
@ -4180,7 +4180,7 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
|
||||||
actor->touching_sectorlist = NULL; // NULL head of sector list // phares 3/13/98
|
actor->touching_sectorlist = NULL; // NULL head of sector list // phares 3/13/98
|
||||||
if (G_SkillProperty(SKILLP_FastMonsters) && actor->GetClass()->FastSpeed >= 0)
|
if (G_SkillProperty(SKILLP_FastMonsters) && actor->GetClass()->FastSpeed >= 0)
|
||||||
actor->Speed = actor->GetClass()->FastSpeed;
|
actor->Speed = actor->GetClass()->FastSpeed;
|
||||||
actor->DamageMultiply = FRACUNIT;
|
actor->DamageMultiply = 1.;
|
||||||
|
|
||||||
// set subsector and/or block links
|
// set subsector and/or block links
|
||||||
actor->LinkToWorld (SpawningMapThing);
|
actor->LinkToWorld (SpawningMapThing);
|
||||||
|
|
Loading…
Reference in a new issue