- store floating point parameters for DECORATE properties as doubles.
This commit is contained in:
parent
73cbc59dd9
commit
d25455736a
3 changed files with 12 additions and 9 deletions
|
|
@ -2174,7 +2174,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, color, C_f, Inventory)
|
|||
}
|
||||
if (PROP_PARM_COUNT > 2)
|
||||
{
|
||||
PROP_FLOAT_PARM(falpha, 2);
|
||||
PROP_DOUBLE_PARM(falpha, 2);
|
||||
alpha=int(falpha*255);
|
||||
}
|
||||
else alpha = 255/3;
|
||||
|
|
@ -2718,17 +2718,17 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, damagescreencolor, Cfs, PlayerPawn)
|
|||
}
|
||||
else if (PROP_PARM_COUNT < 4)
|
||||
{
|
||||
PROP_FLOAT_PARM(a, 2);
|
||||
PROP_DOUBLE_PARM(a, 2);
|
||||
|
||||
color.a = BYTE(255 * clamp(a, 0.f, 1.f));
|
||||
color.a = BYTE(255 * clamp<double>(a, 0.f, 1.f));
|
||||
defaults->DamageFade = color;
|
||||
}
|
||||
else
|
||||
{
|
||||
PROP_FLOAT_PARM(a, 2);
|
||||
PROP_DOUBLE_PARM(a, 2);
|
||||
PROP_STRING_PARM(type, 3);
|
||||
|
||||
color.a = BYTE(255 * clamp(a, 0.f, 1.f));
|
||||
color.a = BYTE(255 * clamp<double>(a, 0.f, 1.f));
|
||||
assert(info->IsKindOf(RUNTIME_CLASS(PClassPlayerPawn)));
|
||||
static_cast<PClassPlayerPawn *>(info)->PainFlashes.Insert(type, color);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue