aboutsummaryrefslogtreecommitdiff
path: root/src/cavegen.cpp
Commit message (Expand)AuthorAge
* Cavegen: Fix non-constant array initializer error for MSVCSmallJoker2017-04-07
* Cavegen/Mgv5/Mgv7: Add optional giant cavernsparamat2017-04-03
* Cavegen: Place correct biome surface in tunnel entrancesparamat2017-02-16
* Mgvalleys / cavegen: Place riverbed nodes under river waterparamat2016-07-21
* Change internal type for seeds to s32kwolekr2016-06-04
* Disallow external linkage for default Cavegen NoiseParamskwolekr2016-05-27
* Cavegen: Move V5-style caves to CavesNoiseIntersectionkwolekr2016-05-27
* Cavegen: Minor misc. fixeskwolekr2016-05-27
* Fix undefined evaluation order when constructing random vectorskwolekr2016-05-27
* Cavegen: Re-add small caves to CavesRandomWalkkwolekr2016-05-27
* Cavegen: Remove CavesRandomWalk dependency on Mapgenkwolekr2016-05-27
* Cavegen: Merge instances of repetitive surface level-finding codekwolekr2016-05-27
* Cavegen: Remove CavesV6 dependency on Mapgenkwolekr2016-05-27
* Cavegen: Rename CaveV6 to CavesV6kwolekr2016-05-27
* Cavegen: Merge CaveV5 and CaveV7 into CavesRandomWalkkwolekr2016-05-27
* Mapgen: Various fixes and improvementsparamat2016-01-11
* Cavegen: Make mgfractal use mgv5 cavegenparamat2015-11-09
* Fractal mapgen: Add seabed and large pseudorandom cavesparamat2015-10-07
* Cavegen V6: Make all caves consistent with 0.4.12 stableparamat2015-08-03
* Cavegen: Mgv6: No small caves entirely above groundparamat2015-07-19
* Cavegen: Cleanup code. Define constant for MGV7_LAVA_DEPTHparamat2015-07-01
* Cavegen: Remove now unnecessary checks for water, lava, iceparamat2015-04-07
* Cavegen, mgv5: Cleanup codeparamat2015-03-04
* Mgv6: Add heightmap. Do not make large caves that are entirely above groundparamat2015-03-02
* Mgv5: Remove blobgen. Remove crumble and wetness noisesparamat2015-02-21
* Cavegen: Fix copy & paste error (solves #2020)kwolekr2014-12-28
* Add flags and lacunarity as new noise parameterskwolekr2014-12-07
* Rewrite generate notification mechanismkwolekr2014-12-06
* Huge overhaul of the entire MapgenParams systemkwolekr2014-02-03
* Add map feature generation notify Lua APIkwolekr2013-12-14
* Cavegen: Fix possible out-of-bounds heightmap accesskwolekr2013-12-01
* Cavegen: Respect is_ground_content MapNode setting; fix some code formatting ...kwolekr2013-11-29
* Mapgen V7: Huge rewrite, also tweaks to cavegen et al.kwolekr2013-07-06
* Cavegen: Prevent caves from occuring above ground level, and superfluous mixi...kwolekr2013-07-01
* Cavegen: fix division by 0 with abnormal max tunnel diameter sizeskwolekr2013-06-23
* Enhance caves for mgv7, add ravineskwolekr2013-04-27
* Class-ify caves & move to cavegen.cpp, fix cave regression, add caves to Mapg...kwolekr2013-04-21
>()) { address = bind_addr; } } catch (ResolveError &e) { } UDPSocket socket(false); socket.Bind(address); const char sendbuffer[] = "hello world!"; /* * If there is a bind address, use it. * It's useful in container environments */ if (address != Address(0, 0, 0, 0, port)) socket.Send(address, sendbuffer, sizeof(sendbuffer)); else socket.Send(Address(127, 0, 0, 1, port), sendbuffer, sizeof(sendbuffer)); sleep_ms(50); char rcvbuffer[256] = { 0 }; Address sender; for (;;) { if (socket.Receive(sender, rcvbuffer, sizeof(rcvbuffer)) < 0) break; } //FIXME: This fails on some systems UASSERT(strncmp(sendbuffer, rcvbuffer, sizeof(sendbuffer)) == 0); if (address != Address(0, 0, 0, 0, port)) { UASSERT(sender.getAddress().sin_addr.s_addr == address.getAddress().sin_addr.s_addr); } else { UASSERT(sender.getAddress().sin_addr.s_addr == Address(127, 0, 0, 1, 0).getAddress().sin_addr.s_addr); } } void TestSocket::testIPv6Socket() { Address address6((IPv6AddressBytes *)NULL, port); UDPSocket socket6; if (!socket6.init(true, true)) { /* Note: Failing to create an IPv6 socket is not technically an error because the OS may not support IPv6 or it may have been disabled. IPv6 is not /required/ by minetest and therefore this should not cause the unit test to fail */ dstream << "WARNING: IPv6 socket creation failed (unit test)" << std::endl; return; } const char sendbuffer[] = "hello world!"; IPv6AddressBytes bytes; bytes.bytes[15] = 1; socket6.Bind(address6); try { socket6.Send(Address(&bytes, port), sendbuffer, sizeof(sendbuffer)); sleep_ms(50); char rcvbuffer[256] = { 0 }; Address sender; for(;;) { if (socket6.Receive(sender, rcvbuffer, sizeof(rcvbuffer)) < 0) break; } //FIXME: This fails on some systems UASSERT(strncmp(sendbuffer, rcvbuffer, sizeof(sendbuffer)) == 0); UASSERT(memcmp(sender.getAddress6().sin6_addr.s6_addr, Address(&bytes, 0).getAddress6().sin6_addr.s6_addr, 16) == 0); } catch (SendFailedException &e) { errorstream << "IPv6 support enabled but not available!" << std::endl; } }