- fixed FxFRandom setup which used a path in FxRandom that is no longer supported.

This commit is contained in:
Christoph Oelckers 2018-11-17 08:06:23 +01:00 committed by drfrag
parent 075a666c75
commit 6d8cf38cef
2 changed files with 15 additions and 6 deletions

View file

@ -5449,14 +5449,23 @@ ExpEmit FxMinMax::Emit(VMFunctionBuilder *build)
//
//
//==========================================================================
FxRandom::FxRandom(FRandom * r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos, bool nowarn)
FxRandom::FxRandom(EFxType type, FRandom * r, const FScriptPosition &pos)
: FxExpression(EFX_Random, pos)
{
EmitTail = false;
rng = r;
}
//==========================================================================
//
//
//
//==========================================================================
FxRandom::FxRandom(FRandom * r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos, bool nowarn)
: FxRandom(EFX_Random, rng, pos)
{
assert(mi && ma);
min = new FxIntCast(mi, nowarn);
max = new FxIntCast(ma, nowarn);
rng = r;
ValueType = TypeSInt32;
}
@ -5729,13 +5738,12 @@ ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
//
//==========================================================================
FxFRandom::FxFRandom(FRandom *r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos)
: FxRandom(r, nullptr, nullptr, pos, true)
: FxRandom(EFX_FRandom, r, pos)
{
assert(mi && ma);
min = new FxFloatCast(mi);
max = new FxFloatCast(ma);
ValueType = TypeFloat64;
ExprType = EFX_FRandom;
}
//==========================================================================