mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-21 03:21:28 +00:00
allow nullptr with spriteid/textureid/translationid (for default parameters/etc)
This commit is contained in:
parent
d36fa3c36b
commit
bdddfcc80a
1 changed files with 6 additions and 0 deletions
|
@ -1842,6 +1842,12 @@ FxExpression *FxTypeCast::Resolve(FCompileContext &ctx)
|
|||
{
|
||||
goto basereturn;
|
||||
}
|
||||
else if (ctx.Version >= MakeVersion(4, 15, 0) && basex->ValueType == TypeNullPtr && (ValueType == TypeSpriteID || ValueType == TypeTextureID || ValueType == TypeTranslationID))
|
||||
{
|
||||
delete basex;
|
||||
basex = new FxConstant(0, ScriptPosition);
|
||||
goto basereturn;
|
||||
}
|
||||
else if (IsFloat())
|
||||
{
|
||||
FxExpression *x = new FxFloatCast(basex);
|
||||
|
|
Loading…
Reference in a new issue