From 76582b6890294d2a53163a4be1b806c454aba90e Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Thu, 4 Jan 2024 01:32:45 +0100 Subject: Use `getrandom()` instead of random int from player array (#778) Use `getrandom()` instead of random int from player array to select infected Co-authored-by: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> --- Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut index c7175e749..02f0799a1 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut @@ -54,7 +54,7 @@ void function SelectFirstInfectedDelayed() return } - entity infected = players[ RandomInt( players.len() ) ] + entity infected = players.getrandom() InfectPlayer( infected ) RespawnInfected( infected ) -- cgit v1.2.3