MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / correctDropPosition

Method correctDropPosition

source/entities/MovableGameEntity.cpp:394–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394void MovableGameEntity::correctDropPosition(Ogre::Vector3& position)
395{
396 const double offset = 0.3;
397 if(position.x > 0)
398 position.x += Random::Double(-offset, offset);
399
400 if(position.y > 0)
401 position.y += Random::Double(-offset, offset);
402
403 if(position.z > 0)
404 position.z += Random::Double(-offset, offset);
405}

Callers 1

dropHandMethod · 0.45

Calls 1

DoubleFunction · 0.85

Tested by

no test coverage detected