mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
ad884f23d4
commit
4e93ba06a7
7 changed files with 98 additions and 108 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue