- scriptified P_CalcHeight.
This was the only code using the ViewBob member variable. This also moves the range check for this variable to its application, because a badly behaved mod can just as easily change it at run time instead of just setting an absurdly large value in the class definition.
This commit is contained in:
parent
9e5c5b68c5
commit
2bd72478ee
8 changed files with 170 additions and 175 deletions
|
|
@ -1696,26 +1696,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, weaponslot, ISsssssssssssssssssssssssssssss
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// [SP] Player.Viewbob
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, viewbob, F, PlayerPawn)
|
||||
{
|
||||
PROP_DOUBLE_PARM(z, 0);
|
||||
// [SP] Hard limits. This is to prevent terrywads from making players sick.
|
||||
// Remember - this messes with a user option who probably has it set a
|
||||
// certain way for a reason. I think a 1.5 limit is pretty generous, but
|
||||
// it may be safe to increase it. I really need opinions from people who
|
||||
// could be affected by this.
|
||||
if (z < 0.0 || z > 1.5)
|
||||
{
|
||||
I_Error("ViewBob must be between 0.0 and 1.5.");
|
||||
}
|
||||
defaults->ViewBob = z;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
// (non-fatal with non-existent types only in DECORATE)
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue