NPCs & Players(rarely) falling through the terrain
I just found an issue with the monsters and players(rarely) falling through the terrain. Im afraid this "bug" has been part of sphere forever. At this location in Buccaneers den 2722,2025,22, i remember falling to the caves forever.
For some reason, NPCs are constantly falling through the roof into the cave, even tho the tiles are in flat line of same height.
So first we have lets say mine cave in height = 0 | you can see its in static

Above this, we have graveyard, which is part of map terrain, height = 40 / 50

Could be link to that: https://github.com/Sphereserver/Source-X/issues/983
Can be related, but I dont think so. It could be related if the tile that make u fall is not flat or if it is surrounded by not flat tiles. Anyway I dont know xD
IT would be so usefull (at least for me that im not good programing), to be able to recreate this issue using centred. We need to know the exactly circunstances this bug show up.
Movement system is a nightmare for me. MAybe a senior should take care about this.
you dont need to recreate it, in buccaneers den in original files, there are caves systems around the village, and there are NPCs falling through immediately.

Atila, have u info about which directions makes u fall down? or happens with all directions? any info u can gather will speed things up. for example.
on=@falling
serv.log dir <dir>, fromZ <p.z>, toZ <argn3>
dir 4, fromZ 41, toZ 0 dir 0, fromZ 41, toZ 0 dir 5, fromZ 41, toZ 0 dir 7, fromZ 41, toZ 0 dir 6, fromZ 41, toZ 0 dir 0, fromZ 40, toZ 0 dir 1, fromZ 40, toZ 0 dir 6, fromZ 41, toZ 0
u sure it is a normal grass terrain and not a fake terrain like tha one used for hidden places?
u sure it is a normal grass terrain and not a fake terrain like tha one used for hidden places?
not sure how do i know the fake one, but this is standard grass terrain 03 04 05 06 which is used everywhere, same with dirt terrain 078 071 074 073
There is a fail with alttitude at sphere. Some terrain's Z are bad calculated. In certain terrain tiles, sphere put the Char at lower z than it should. It can happen that when sphere applys gravity it select as new tile the static floor of the cave as lower point. Should be related to this but maybe there could be more.
There is something seriously wrong with the Z calculations and overall monsters or objects calculating it. Like lots of the statics are just weird. Monsters claiming half walls, even the roofs sometimes, then failing to get down from there. Other time they fall through. Idk whats going on

@AtillaG1 can you test it on
https://github.com/Sphereserver/Source-X/actions/runs/6511357815
to see if it's fixed.
Still keeps happening, sadly. I spawned rats above the cave, and they fell down.
Interesting is, that on the right side, they dont fall down. on the left side they do.
Right side terrains = 03 06 0c7
Left side terrains = 071 075 0c5 077
What's the location of these sections? And how do you drop down while walking or after used .update etc?
Its custom location, but on original map its here, 2736,2061,31. Players can fell down just by running over it, but not happens everytime. Monsters fall constantly.
Should have been fixed with last update. I remember there was some spots in Buccaneer's Den that you can drop down, but we changed the Z calculation system so now it should calculate it correctly.
Just paste here link of PR for link with this issue: https://github.com/Sphereserver/Source-X/pull/1128
I just briefly tested from work and its still same problem. It almost feels like the NPCs can walk through the little gaps in terrain which they should not. I have noticed it in dungeon too, I will try to explain best I can.
CASE 1: you have dungeon floor Z=0, on this floor, you have stalagmites or rock on Z=2, all in static/map. The NPC it feels like its height is ignored, and squueks through the gap between 0-2, which should be impossible, and then suddenly its stucked and cant go back. If the terrain is going uphill to the rock or stalagmites, then they go there even easier.
CASE 2: you have terrain like shown on example, and bellow this you have cave, same as in case 1, it seems like the NPC can squeek through the little gaps in terrain. 2 2 2 2 0 0 0 0 -2 -2 -2 -2 this represent the terrain going up like in buccaneers den, so whenever the terrain isnt exactly Z=0 at all tiles, the NPC can squeeks through, more rarely players too.
I have mentioned this issue also in this thread, since the issues seemed like mixing together. #1063
About Buccaneer's Den:
That post is taken from the OSI's forum, and I can confirm that even in Sphere that spot where you fall down to the tunnel does indeed exist. So I think it's a client/map glitch more than a sphere problem. Coordinates around 2693,2057,23. Just run around between the ferns and tress while on the crest of the hill
About Buccaneer's Den:
That post is taken from the OSI's forum, and I can confirm that even in Sphere that spot where you fall down to the tunnel does indeed exist. So I think it's a client/map glitch more than a sphere problem. Coordinates around 2693,2057,23. Just run around between the ferns and tress while on the crest of the hill
Know about this one, but im testing it like 2 screens away. Around this area they are still falling down like apples from trees. 2732,2060,25
Btw. can this be linked to low height of NPC?
Silly because I run the place you said for 10 mins and never dropped down, I will give a try with npcs tonight to see if I can reproduce the issue, because as I can't reproduce, I can't manage to find issue at all, I can only guess why it happens.
Silly because I run the place you said for 10 mins and never dropped down, I will give a try with npcs tonight to see if I can reproduce the issue, because as I can't reproduce, I can't manage to find issue at all, I can only guess why it happens.
I will try more stuff on how to reproduce, but with players falling its very rarely, with npcs its immediate.
13:28:(e_npc_generic_event.scp,105)DIR 6, NPC: Llama 03149e with Height: 10 Falling from: 2726,2065,27 - TO: X:2725 Y:2064 Z:-20 | REGION: Buccaneer's Den Uzemi
21:37:(e_npc_generic_event.scp,105)DIR 3, NPC: Llama 0255f6 WITH HEIGHT: 10 FALLING FROM: 2730,2057,29 - TO: X:2731 Y:2069 Z:10 | REGION: Buccaneer's Den Uzemi
21:37:(e_npc_generic_event.scp,105)DIR 3, NPC: Rat 0255e7 WITH HEIGHT: 2 FALLING FROM: 2732,2059,25 - TO: X:2721 Y:2061 Z:-20 | REGION: Buccaneer's Den Uzemi
:38:(e_npc_generic_event.scp,105)DIR 3, NPC: Rat 0255f2 WITH HEIGHT: 2 FALLING FROM: 2734,2063,25 - TO: X:2735 Y:2063 Z:-20 | REGION: Buccaneer's Den Uzemi
21:38:(e_npc_generic_event.scp,105)DIR 7, NPC: Rat 0255e8 WITH HEIGHT: 2 FALLING FROM: 2730,2062,21 - TO: X:2730 Y:2061 Z:-20 | REGION: Buccaneer's Den Uzemi
21:38:(e_npc_generic_event.scp,105)DIR 0, NPC: Llama 0255ee WITH HEIGHT: 10 FALLING FROM: 2727,2065,21 - TO: X:2726 Y:2064 Z:-20 | REGION: Buccaneer's Den Uzemi
1:40:(e_npc_generic_event.scp,105)DIR 7, NPC: Rat 01c536 WITH HEIGHT: 2 FALLING FROM: 2647,2146,10 - TO: X:2646 Y:2146 Z:-20 | REGION: Buccaneer's Den Uzemi
21:41:(e_npc_generic_event.scp,105)DIR 5, NPC: Llama 0255f0 WITH HEIGHT: 10 FALLING FROM: 2736,2066,31 - TO: X:2735 Y:2067 Z:18 | REGION: Buccaneer's Den Uzemi
21:41:(e_npc_generic_event.scp,105)DIR 0, NPC: Llama 0255ea WITH HEIGHT: 10 FALLING FROM: 2726,2065,27 - TO: X:2725 Y:2064 Z:-20 | REGION: Buccaneer's Den Uzemi
43:(e_npc_generic_event.scp,105)DIR 6, NPC: Llama 0255f0 WITH HEIGHT: 10 FALLING FROM: 2737,2067,25 - TO: X:2736 Y:2068 Z:15 | REGION: Buccaneer's Den Uzemi
21:44:(e_npc_generic_event.scp,105)DIR 4, NPC: Spectre 0255dc WITH HEIGHT: 18 FALLING FROM: 2747,2057,26 - TO: X:2746 Y:2058 Z:-20 | REGION: Buccaneer's Den Uzemi
(e_npc_generic_event.scp,105)DIR 2, NPC: Spectre 0255e4 WITH HEIGHT: 18 FALLING FROM: 2746,2058,36 - TO: X:2747 Y:2057 Z:26 | REGION: Buccaneer's Den Uzemi
21:44:(e_npc_generic_event.scp,105)DIR 6, NPC: Spectre 0255e4 WITH HEIGHT: 18 FALLING FROM: 2748,2057,24 - TO: X:2747 Y:2058 Z:-20 | REGION: Buccaneer's Den Uzemi
Is this still happening? There was a commit some time ago which introduced z map tile averaging
The location above tunels in buccaners den was always weird, and there is atleast 1 fall through intended from OSI.
In regards to other spots, it was in custom locations, I looked through the similar locations from other server, and they are bulding it so that above the mining caves, on the grass where you can run, they build like extra layer of special invisible black tiles 0x0490, so maybe thats the correct way how to prevent falling through in such locations.
However, since no one really reported same issue, I would close it for now.
This can happen if custom npcs have no height and there is a gap betwen terrain and the static. (i think)
There is something seriously wrong with the Z calculations and overall monsters or objects calculating it. Like lots of the statics are just weird. Monsters claiming half walls, even the roofs sometimes, then failing to get down from there. Other time they fall through. Idk whats going on
Thoose are stairs ("bridge" on tiledata) I think npcs can climb them even if players can't. But not sure. I think client denys it but sphere allow it, so players can't but by client side.
Yea I fixed this one long time ago. My dumbass activated in all regions noblockheight flag.
So, all issues of this post are fixed? should it be closed?
