mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- use the native implementation for Duke.rnd.
This ensures that results are consistent.
This commit is contained in:
parent
fc45636215
commit
8aaa8b4113
2 changed files with 9 additions and 4 deletions
|
@ -251,6 +251,14 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Duke, setnextmap, setnextmap)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Duke, rnd, rnd)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(v);
|
||||
ACTION_RETURN_BOOL(rnd(v));
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_GLOBAL_UNSIZED(dlevel)
|
||||
DEFINE_GLOBAL(camsprite)
|
||||
|
||||
|
|
|
@ -182,10 +182,7 @@ struct Duke native
|
|||
static native bool isshootableswitch(TextureID tex);
|
||||
static native bool CheckSprite(class<DukeActor> tex);
|
||||
static native bool setnextmap(bool checksecret);
|
||||
static int rnd(int val)
|
||||
{
|
||||
return (random(0, 255) >= (255 - (val)));
|
||||
}
|
||||
static native int rnd(int val);
|
||||
|
||||
static void PlayBonusMusic()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue