Skip to content

Commit 7514ace

Browse files
committed
play: Do math.randomseed once
As @xLive suggested in last commit, using os.time() on resource start is enough to make them random.
1 parent c319c02 commit 7514ace

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

[gamemodes]/[play]/play/play.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local function onResourceStartPlay()
2+
math.randomseed(os.time()) -- Fix getting exact same skins over and over
23
resetMapInfo()
34
createVehicles()
45

[gamemodes]/[play]/play/play_players.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ function playSpawnPlayer(playerElement)
66
return false
77
end
88

9-
math.randomseed(getTickCount()) -- Fix getting exact same skins over and over
109
local randomSpawn = math.random(spawnsCount)
1110
local spawnData = playerSpawns[randomSpawn]
1211
local posX, posY, posZ, rotX = unpack(spawnData)

0 commit comments

Comments
 (0)