oops flipped a negative

This commit is contained in:
Weston Salinas 2023-03-27 16:38:31 -05:00
parent 0642146034
commit 5682481ec9
2 changed files with 3 additions and 3 deletions

View file

@ -203,9 +203,9 @@ void rigidBodyTeleport(struct RigidBody* rigidBody, struct Transform* from, stru
//the to portal will teleport the player slightly in front of it. (altering the z)
if (rigidBody->flags & RigidBodyIsPlayer){
if (localPoint.z >= 0){
localPoint.z = minf(localPoint.z, -PLAYER_PORTAL_EXIT_Z_DISTANCE);
localPoint.z = minf(localPoint.z, PLAYER_PORTAL_EXIT_Z_DISTANCE);
}else{
localPoint.z = maxf(localPoint.z, PLAYER_PORTAL_EXIT_Z_DISTANCE);
localPoint.z = maxf(localPoint.z, -PLAYER_PORTAL_EXIT_Z_DISTANCE);
}
}

View file

@ -12,7 +12,7 @@
#define MAX_PORTAL_SPEED (500.0f / 64.0f)
#define PLAYER_PORTAL_ENTRY_Z_DISTANCE (0.05f)
#define PLAYER_PORTAL_EXIT_Z_DISTANCE (0.07f)
#define PLAYER_PORTAL_EXIT_Z_DISTANCE (0.1f)
#define PORTAL_EXIT_XY_CLAMP_DISTANCE (0.07f)
enum RigidBodyFlags {