aboutsummaryrefslogtreecommitdiff
path: root/src/collision.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/collision.h')
-rw-r--r--src/collision.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/collision.h b/src/collision.h
index fc4187eda..1ceaba81c 100644
--- a/src/collision.h
+++ b/src/collision.h
@@ -57,13 +57,15 @@ struct collisionMoveResult
bool collides;
bool collides_xz;
bool standing_on_unloaded;
+ bool standing_on_object;
std::vector<CollisionInfo> collisions;
collisionMoveResult():
touching_ground(false),
collides(false),
collides_xz(false),
- standing_on_unloaded(false)
+ standing_on_unloaded(false),
+ standing_on_object(false)
{}
};
@@ -71,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:
@@ -81,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.