mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- parameters for FRandomPick should not be added up.
(I hope that this code is correct, all I can judge it by is the assert not being triggered.)
This commit is contained in:
parent
e42b688afa
commit
4c17bd65a4
2 changed files with 4 additions and 2 deletions
|
@ -2189,6 +2189,7 @@ ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
|
|||
{
|
||||
double val = static_cast<FxConstant *>(choices[i])->GetValue().GetFloat();
|
||||
build->Emit(OP_PARAM, 0, REGT_FLOAT | REGT_KONST, build->GetConstantFloat(val));
|
||||
build->ParamChange(-1); // all params should use the same register here.
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -51,6 +51,9 @@ public:
|
|||
void FillAddressConstants(FVoidObj *konst, VM_ATAG *tags);
|
||||
void FillStringConstants(FString *strings);
|
||||
|
||||
// PARAM increases ActiveParam; CALL decreases it.
|
||||
void ParamChange(int delta);
|
||||
|
||||
// Track available registers.
|
||||
RegAvailability Registers[4];
|
||||
|
||||
|
@ -76,8 +79,6 @@ private:
|
|||
|
||||
TArray<VMOP> Code;
|
||||
|
||||
// PARAM increases ActiveParam; CALL decreases it.
|
||||
void ParamChange(int delta);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue