Opened 7 years ago
Last modified 6 years ago
#4338 closed defect
Large and small stone colliding — at Version 2
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 23 |
Component: | Maps | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Change History (4)
by , 7 years ago
Attachment: | replay.txt added |
---|
by , 7 years ago
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
There's a big bug in placer.js. It stores the previous coordinates like this:
In entity.js these are converted to meters rather than tiles:
But then in player.js when testing for avoidSelf it mixes the two instead of dividing the position by CELL_SIZE:
So, for example:
The avoidSelf check literally never fails.
So we see berry bushes overlapping even though they have an avoidSelf check. (There probably should be a max radius involved here instead of always checking < 1 tile.)
For big and small stones, each SimpleObject in the SimpleGroup is checked against itself rather than also against previous things, so even if the avoidSelf check had been working we would still have this problem. And again, even if that too had been working it only checks within one tile, and large stones have a 20m = 5 tile diameter and small stones a 10m = 2.5 tile diameter, so they could still overlap. (Their obstructions are squares with sides 13m and 7m.)
This stuff needs a little help. :)