Skip to content

Commit a92fe8f

Browse files
aspizuadazem009
authored andcommitted
Always select a different random backdrop. (Closes #521)
1 parent c99bcdb commit a92fe8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/blocks/looksblocks.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,9 @@ void LooksBlocks::randomBackdropImpl(VirtualMachine *vm)
964964
if (Stage *stage = vm->engine()->stage()) {
965965
std::size_t count = stage->costumes().size();
966966

967-
if (count > 0)
968-
stage->setCostumeIndex(rng->randint(0, count - 1));
967+
if (count > 0) {
968+
stage->setCostumeIndex(rng->randintExcept(0, count - 1, stage->costumeIndex()));
969+
}
969970
}
970971
}
971972

0 commit comments

Comments
 (0)