{"push_id":900267728,"size":1,"distinct_size":1,"ref":"refs/heads/random_xz","head":"502c0b9e74b5229cd6c1dd67f8b8e52391e7b3e0","before":"c47b5cf801ced3d34a8fcda8b1ca22a57c8ee691","commits":[{"sha":"502c0b9e74b5229cd6c1dd67f8b8e52391e7b3e0","author":{"email":"25cbc9971afc676c5c7263366b8caeea3091aa03@foo-projects.org","name":"Auke Kok"},"message":"Allow client to randomize x,z placement of plantlike nodes.\n\nAdd a nodedef 'random_xz' bool that tells the client that these\nplantlike nodes can be placed slightly offset (+/- 0.2) randomly.\n\nThe client then uses the pseudo random number generator that is\nseeded for each plantlike node with the node's X,Z coordinates.\nThis means that no rng work is done for non-randomly moved nodes.\n\nThis ensures that map updates do not cause nodes using this facility\nto jump around if plants are removed or added, since each node will\nalways end up with the same random value.\n\nsubgame developers can enable this client side drawing change by adding\n'random_xz = true' to their register_item() calls. This should likely\nbe only ever added for wild plants and wild flowers. This method\nalso allows mixing of normal placement and random_xz placement\nby duplicating the nodedefs (one with, and one without random_xz\nflag). E.g. wild:grass_1 vs.  default:grass_1.\n\nSince this is a protocol change I've added the necessary version bits\nto assure this change isn't backwards incompatible. I tested this\nby connecting a plain 0.4.13 client against the git branch server,\nand this works.\n\nThe random placement offset is random enough to create a visually\nappealing effect even at low res textures, but still make it very\neasy to locate the exact location of the node itself.\n\nV2: use PseudoRng class from noise.h instead of custom pseudo rng.\nV3: improve randomness a bit by truncating rand() more often.","distinct":true,"url":"https://api.github.com/repos/sofar/minetest/commits/502c0b9e74b5229cd6c1dd67f8b8e52391e7b3e0"}]}