MCPcopy Create free account
hub / github.com/assaultcube/AC / worldbordercheck

Function worldbordercheck

source/src/world.cpp:679–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679bool worldbordercheck(int x1, int x2, int y1, int y2, int z1, int z2) // check for solid world border
680{
681 loop(x, ssize) loop(y, ssize)
682 {
683 if(x >= x1 && x < ssize - x2 && y >= y1 && y < ssize - y2)
684 {
685 if(S(x,y)->type != SOLID && (S(x,y)->ceil > 126 - z1 || S(x,y)->floor < -127 + z2)) return false;
686 }
687 else
688 {
689 if(S(x,y)->type != SOLID) return false;
690 }
691 }
692 return true;
693}
694
695bool empty_world(int factor, bool force) // main empty world creation routine, if passed factor -1 will enlarge old world by 1, factor -2 will shrink old world by 1
696{

Callers 2

empty_worldFunction · 0.85
movemapFunction · 0.85

Calls 1

loopFunction · 0.70

Tested by

no test coverage detected