Jens Rottmann
0c893ea123
Fix player coordinate rounding in collisionMoveSimple() ( #6197 )
...
To determine the area (nodes) where a player movement took place
collisionMoveSimple() first took the old/new player coordinates and rounded
them to integers, then added the player character's collision box and
implicitely rounded the result. This has 2 problems:
Rounding the position and the box seperately, then adding the resulting
integers means you get twice the rounding error. And implicit rounding
always rounds towards 0.0, unlike floatToInt(), which rounds towards the
closest integer.
Previous (simplified) behavior: round(pos)+(int)box, for example player at
Y=0.9, body is 1.75m high: round(0.9)+(int)1.75 = 1+1 = 2.
==> A character's height of 1.75m always got rounded down to 1m, its width
of +/-0.3 even became 0.
Fixed by adding the floats first, then rounding properly: round(pos+box) =
round(0.9+1.75) = round(2.65) = 3.
2017-08-05 12:38:11 +02:00
..
2017-08-03 14:03:15 +02:00
2017-06-20 17:18:34 +02:00
2017-07-25 07:32:44 +02:00
2017-08-04 21:57:50 +02:00
2017-06-27 11:54:40 +02:00
2017-06-19 23:54:58 +02:00
2017-07-07 22:28:23 +01:00
2017-07-07 22:28:23 +01:00
2017-06-16 11:25:52 +02:00
2017-06-16 11:25:52 +02:00
2017-07-29 19:24:10 +02:00
2017-07-29 19:24:10 +02:00
2017-07-26 07:35:09 +02:00
2017-06-22 13:20:20 +02:00
2017-06-16 11:25:52 +02:00
2017-06-16 11:25:52 +02:00
2017-07-16 10:47:31 +02:00
2017-07-18 21:39:55 +02:00
2017-07-18 21:39:55 +02:00
2017-07-07 22:28:23 +01:00
2017-07-07 22:28:23 +01:00
2017-07-16 10:47:31 +02:00
2017-07-16 10:47:31 +02:00
2017-07-30 18:28:16 +01:00
2017-06-26 20:11:17 +02:00
2017-06-16 11:25:52 +02:00
2017-06-16 11:25:52 +02:00
2017-06-04 21:00:04 +02:00
2017-07-07 22:28:23 +01:00
2017-06-16 11:25:52 +02:00
2017-04-30 00:06:13 +01:00
2017-07-05 15:39:49 +02:00
2017-07-05 15:39:49 +02:00
2017-07-18 21:29:23 +02:00
2017-08-05 12:38:11 +02:00
2017-06-16 11:25:52 +02:00
2017-05-09 03:52:28 +01:00
2017-07-30 18:40:45 +01:00
2017-07-07 22:28:23 +01:00
2017-06-16 11:25:52 +02:00
2017-07-17 20:13:53 +01:00
2017-07-11 01:02:22 +01:00
2017-06-06 16:19:04 +02:00
2017-06-06 16:19:04 +02:00
2017-06-16 11:25:52 +02:00
2017-06-16 11:25:52 +02:00
2017-07-27 11:32:35 +02:00
2017-07-07 22:28:23 +01:00
2017-07-14 20:37:58 +02:00
2017-07-14 20:37:58 +02:00
2017-02-04 22:07:55 +00:00
2017-06-16 11:25:52 +02:00
2017-06-04 09:57:08 +02:00
2017-04-23 16:22:53 +02:00
2017-04-23 16:22:53 +02:00
2017-06-04 09:57:08 +02:00
2017-06-27 11:54:40 +02:00
2017-06-16 11:25:52 +02:00
2017-03-11 21:39:32 +01:00
2017-06-16 11:25:52 +02:00
2017-06-25 11:39:39 +02:00
2017-06-16 11:25:52 +02:00
2017-04-23 14:35:08 +02:00
2017-04-23 14:35:08 +02:00
2017-06-16 11:25:52 +02:00
2017-06-27 11:54:40 +02:00
2017-07-30 18:24:45 +01:00
2017-04-23 09:52:40 +02:00
2017-07-26 07:35:09 +02:00
2017-02-26 06:46:14 +00:00
2017-07-25 08:47:52 +02:00
2017-06-16 11:25:52 +02:00
2017-07-07 22:28:23 +01:00
2017-07-07 22:28:23 +01:00
2017-06-16 11:25:52 +02:00
2017-06-16 11:25:52 +02:00
2017-06-06 16:29:28 +02:00
2017-06-06 16:29:28 +02:00
2017-04-19 00:36:30 +02:00
2016-12-20 17:17:38 +10:00
2017-06-26 20:11:17 +02:00
2017-06-16 11:25:52 +02:00
2017-07-30 18:24:45 +01:00
2017-06-26 20:11:17 +02:00
2017-03-16 07:53:39 +01:00
2017-04-06 23:21:40 +02:00
2017-04-20 00:12:52 +02:00
2017-06-16 11:25:52 +02:00
2017-04-29 09:47:22 +02:00
2017-06-21 07:50:57 +02:00
2017-06-16 11:25:52 +02:00
2017-07-05 15:39:49 +02:00
2017-06-26 20:11:17 +02:00
2017-07-01 14:07:40 +02:00
2017-06-26 20:11:17 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-26 20:11:17 +02:00
2017-06-26 20:11:17 +02:00
2017-06-26 20:11:17 +02:00
2017-06-17 19:11:28 +02:00
2017-05-28 15:23:30 +02:00
2016-10-09 10:35:51 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-07-02 20:29:58 +02:00
2017-07-02 20:29:58 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-25 11:39:39 +02:00
2017-06-25 11:39:39 +02:00
2017-07-21 02:03:22 +01:00
2017-07-01 14:07:40 +02:00
2017-04-01 14:48:16 +02:00
2017-04-01 14:48:16 +02:00
2017-04-01 14:48:16 +02:00
2017-04-23 09:52:40 +02:00
2017-04-23 09:52:40 +02:00
2017-06-16 07:17:30 +02:00
2017-04-08 18:39:15 -07:00
2017-06-04 21:00:04 +02:00
2017-06-27 12:34:11 +02:00
2017-02-04 22:07:55 +00:00
2017-07-30 18:24:45 +01:00
2017-07-30 18:24:45 +01:00
2016-12-28 14:16:39 -08:00
2017-04-23 09:52:40 +02:00
2017-07-15 01:27:37 +01:00
2017-07-21 02:03:22 +01:00
2017-06-11 09:43:05 +02:00
2017-06-11 09:43:05 +02:00
2017-06-17 19:11:28 +02:00
2017-06-26 20:11:17 +02:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-07-26 23:11:46 +02:00
2017-07-26 23:11:46 +02:00
2017-07-26 20:12:48 +02:00
2017-06-26 20:11:17 +02:00
2017-07-27 16:55:32 +02:00
2017-06-17 19:11:28 +02:00
2017-07-30 18:40:55 +01:00
2017-07-07 22:28:40 +01:00
2017-07-30 18:40:55 +01:00
2017-06-22 03:14:56 +01:00
2017-07-30 18:40:55 +01:00
2017-07-17 20:19:43 +01:00
2017-05-26 20:46:03 +01:00
2017-05-26 20:46:03 +01:00
2017-07-30 18:40:55 +01:00
2017-06-22 03:14:56 +01:00
2017-07-26 07:35:09 +02:00
2017-06-17 19:11:28 +02:00
2017-07-30 18:40:55 +01:00
2017-07-26 02:41:30 +01:00
2017-07-30 18:40:55 +01:00
2017-06-17 19:11:28 +02:00
2017-07-30 18:40:55 +01:00
2017-07-30 18:40:55 +01:00
2017-07-27 07:56:48 +02:00
2017-01-23 07:27:12 +01:00
2017-06-17 19:11:28 +02:00
2017-06-17 19:11:28 +02:00
2017-06-27 11:54:40 +02:00
2017-06-27 11:54:40 +02:00
2017-06-01 23:18:55 +02:00
2017-06-01 23:18:55 +02:00
2017-04-23 09:52:40 +02:00
2017-02-08 00:15:55 +01:00
2017-05-26 20:46:03 +01:00
2017-06-18 19:55:15 +02:00
2017-07-26 07:35:09 +02:00
2017-07-11 01:14:24 +01:00
2017-07-11 01:14:24 +01:00
2017-07-11 01:14:24 +01:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-07-26 07:35:09 +02:00
2017-07-26 07:35:09 +02:00
2017-06-18 19:55:15 +02:00
2017-04-23 09:52:40 +02:00
2017-07-14 20:37:58 +02:00
2017-07-14 20:37:58 +02:00
2017-06-04 21:00:04 +02:00
2017-06-18 19:55:15 +02:00
2017-07-26 20:12:48 +02:00
2017-07-11 01:02:22 +01:00
2017-05-10 15:29:21 +02:00
2017-06-04 21:00:04 +02:00
2017-06-18 19:55:15 +02:00
2017-07-29 19:01:14 +02:00
2017-06-18 19:55:15 +02:00
2017-06-10 13:49:15 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-07-26 20:12:48 +02:00
2017-06-26 20:11:17 +02:00
2017-04-20 00:12:52 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-07-14 17:31:18 +02:00
2017-06-26 20:11:17 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-06-06 16:29:28 +02:00
2017-07-07 22:28:23 +01:00
2017-07-07 22:28:23 +01:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-05-10 15:29:21 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-06-18 19:55:15 +02:00
2017-07-27 07:56:48 +02:00
2017-07-27 07:56:48 +02:00
2017-07-27 00:16:20 +02:00
2017-07-25 08:47:52 +02:00
2017-07-24 08:26:19 +02:00
2017-07-18 08:23:37 +02:00
2017-03-18 12:37:57 +01:00
2017-03-18 12:37:57 +01:00
2017-06-21 11:51:29 +02:00
2017-06-21 11:51:29 +02:00
2017-07-14 20:37:58 +02:00
2017-07-18 21:39:55 +02:00
2017-07-18 21:39:55 +02:00
2017-07-11 01:02:22 +01:00
2017-06-26 20:11:17 +02:00
2017-07-05 15:39:49 +02:00
2017-07-05 15:39:49 +02:00
2017-06-27 11:54:40 +02:00
2017-06-27 11:54:40 +02:00
2017-06-14 17:21:08 +02:00
2017-06-11 13:58:26 +02:00
2017-06-21 11:51:29 +02:00
2017-06-08 09:50:51 +02:00
2017-06-21 11:51:29 +02:00
2017-06-21 11:51:29 +02:00
2017-01-18 23:21:01 +01:00
2017-04-07 23:22:00 +02:00
2017-06-04 21:00:04 +02:00
2017-06-21 11:51:29 +02:00
2017-06-21 11:51:29 +02:00
2017-06-21 11:51:29 +02:00
2017-07-04 23:18:28 +02:00
2017-04-19 00:36:30 +02:00
2017-07-26 07:35:09 +02:00
2017-07-26 07:35:09 +02:00
2017-07-07 22:28:23 +01:00
2017-07-07 22:28:23 +01:00
2017-07-26 20:12:48 +02:00
2017-07-02 20:29:58 +02:00