diff options
author | est31 <MTest31@outlook.com> | 2016-01-25 00:06:01 +0100 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-01-29 15:53:54 +0100 |
commit | 4e93ba06a749fa2503786bf8d7dbda3d1e36a65a (patch) | |
tree | a694b86c85ab9b14e59ae060ea51eba6c44c8ce9 /src/collision.h | |
parent | ad884f23d4e73d38ce0f529de49591dd66cee44d (diff) | |
download | minetest-4e93ba06a749fa2503786bf8d7dbda3d1e36a65a.tar.gz minetest-4e93ba06a749fa2503786bf8d7dbda3d1e36a65a.tar.bz2 minetest-4e93ba06a749fa2503786bf8d7dbda3d1e36a65a.zip |
Don't pass non-const references to collision methods
Non const references cause a lot of confusion with behaviour of code,
and are disallowed by minetest style guide.
Diffstat (limited to 'src/collision.h')
-rw-r--r-- | src/collision.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/collision.h b/src/collision.h index d1234bef3..1ceaba81c 100644 --- a/src/collision.h +++ b/src/collision.h @@ -73,8 +73,8 @@ struct collisionMoveResult collisionMoveResult collisionMoveSimple(Environment *env,IGameDef *gamedef, f32 pos_max_d, const aabb3f &box_0, f32 stepheight, f32 dtime, - v3f &pos_f, v3f &speed_f, - v3f &accel_f,ActiveObject* self=0, + v3f *pos_f, v3f *speed_f, + v3f accel_f, ActiveObject *self=NULL, bool collideWithObjects=true); // Helper function: @@ -83,7 +83,7 @@ collisionMoveResult collisionMoveSimple(Environment *env,IGameDef *gamedef, // dtime receives time until first collision, invalid if -1 is returned int axisAlignedCollision( const aabb3f &staticbox, const aabb3f &movingbox, - const v3f &speed, f32 d, f32 &dtime); + const v3f &speed, f32 d, f32 *dtime); // Helper function: // Checks if moving the movingbox up by the given distance would hit a ceiling. |