mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add basic unit tests for collisionMoveSimple
This commit is contained in:
parent
1c92d6243f
commit
f916f5de78
4 changed files with 139 additions and 2 deletions
|
@ -24,5 +24,19 @@ public:
|
|||
|
||||
~DummyMap() = default;
|
||||
|
||||
void fill(v3s16 bpmin, v3s16 bpmax, MapNode n)
|
||||
{
|
||||
for (s16 z = bpmin.Z; z <= bpmax.Z; z++)
|
||||
for (s16 y = bpmin.Y; y <= bpmax.Y; y++)
|
||||
for (s16 x = bpmin.X; x <= bpmax.X; x++) {
|
||||
MapBlock *block = getBlockNoCreateNoEx({x, y, z});
|
||||
if (block) {
|
||||
for (size_t i = 0; i < MapBlock::nodecount; i++)
|
||||
block->getData()[i] = n;
|
||||
block->expireIsAirCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool maySaveBlocks() override { return false; }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue