mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-21 11:55:43 +02:00
Optimize random turns in dungeongen (#8129)
It turns out there is no need to return the new value and preserve the old one in random_turn, the procedure can be made to modify the value in-place. This saves quite a bunch of parameter and return value copying.
This commit is contained in:
@@ -34,7 +34,7 @@ class NodeDefManager;
|
||||
|
||||
v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs);
|
||||
v3s16 turn_xz(v3s16 olddir, int t);
|
||||
v3s16 random_turn(PseudoRandom &random, v3s16 olddir);
|
||||
void random_turn(PseudoRandom &random, v3s16 &dir);
|
||||
int dir_to_facedir(v3s16 d);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user