mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Merged default into minor
--HG-- branch : minor
This commit is contained in:
@@ -147,6 +147,9 @@ int w_Mesh_getVertices(lua_State *L)
|
||||
size_t count = t->getVertexCount();
|
||||
lua_createtable(L, count, 0);
|
||||
|
||||
if (count == 0 || vertices == nullptr)
|
||||
return 1;
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
// Create vertex table.
|
||||
|
||||
@@ -81,6 +81,11 @@ void RandomGenerator::setSeed(RandomGenerator::Seed newseed)
|
||||
|
||||
seed = newseed;
|
||||
rng_state = seed;
|
||||
|
||||
// Xorshift's first couple results after seeding will be similar to results
|
||||
// from very similar seeds, so we immediately discard them here.
|
||||
for (int i = 0; i < 2; i++)
|
||||
rand();
|
||||
}
|
||||
|
||||
RandomGenerator::Seed RandomGenerator::getSeed() const
|
||||
|
||||
Reference in New Issue
Block a user