mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
Fixed: The fix for GCC warnings in PowerupDuration would have caused incorrect error messages in case of incorrect use.
SVN r1158 (trunk)
This commit is contained in:
parent
f40d52c22a
commit
9e4b2fb3ec
1 changed files with 2 additions and 1 deletions
|
@ -2232,7 +2232,6 @@ static void PowerupDuration (FScanner &sc, APowerupGiver *defaults, Baggage &bag
|
|||
{
|
||||
int *pEffectTics;
|
||||
|
||||
sc.MustGetNumber();
|
||||
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(APowerup)))
|
||||
{
|
||||
|
@ -2247,6 +2246,8 @@ static void PowerupDuration (FScanner &sc, APowerupGiver *defaults, Baggage &bag
|
|||
sc.ScriptError("\"%s\" requires an actor of type \"Powerup\"\n", sc.String);
|
||||
return;
|
||||
}
|
||||
|
||||
sc.MustGetNumber();
|
||||
*pEffectTics = (sc.Number >= 0) ? sc.Number : -sc.Number * TICRATE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue