Source-X icon indicating copy to clipboard operation
Source-X copied to clipboard

NPCs & Players(rarely) falling through the terrain

Open GladieUO opened this issue 2 years ago • 22 comments

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 image

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

GladieUO avatar Feb 15 '23 17:02 GladieUO

Could be link to that: https://github.com/Sphereserver/Source-X/issues/983

Jhobean avatar Feb 15 '23 22:02 Jhobean

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.

Tolokio avatar Feb 16 '23 15:02 Tolokio

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. image image

GladieUO avatar Feb 16 '23 16:02 GladieUO

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>

Tolokio avatar Feb 17 '23 12:02 Tolokio

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

GladieUO avatar Feb 17 '23 13:02 GladieUO

u sure it is a normal grass terrain and not a fake terrain like tha one used for hidden places?

Tolokio avatar Feb 17 '23 21:02 Tolokio

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

GladieUO avatar Feb 17 '23 22:02 GladieUO

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.

Tolokio avatar Mar 28 '23 14:03 Tolokio

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

image

GladieUO avatar Mar 30 '23 15:03 GladieUO

@AtillaG1 can you test it on

https://github.com/Sphereserver/Source-X/actions/runs/6511357815

to see if it's fixed.

xwerswoodx avatar Oct 13 '23 19:10 xwerswoodx

Still keeps happening, sadly. I spawned rats above the cave, and they fell down. image image

GladieUO avatar Oct 14 '23 10:10 GladieUO

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 image

GladieUO avatar Oct 14 '23 12:10 GladieUO

What's the location of these sections? And how do you drop down while walking or after used .update etc?

xwerswoodx avatar Oct 14 '23 12:10 xwerswoodx

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.

GladieUO avatar Oct 14 '23 12:10 GladieUO

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.

xwerswoodx avatar Oct 19 '23 22:10 xwerswoodx

Just paste here link of PR for link with this issue: https://github.com/Sphereserver/Source-X/pull/1128

Jhobean avatar Oct 20 '23 00:10 Jhobean

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.

image image image I have mentioned this issue also in this thread, since the issues seemed like mixing together. #1063

GladieUO avatar Oct 20 '23 07:10 GladieUO

About Buccaneer's Den: image

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

drk84 avatar Oct 20 '23 08:10 drk84

About Buccaneer's Den: image

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?

GladieUO avatar Oct 20 '23 08:10 GladieUO

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.

xwerswoodx avatar Oct 20 '23 11:10 xwerswoodx

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.

GladieUO avatar Oct 20 '23 11:10 GladieUO

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

GladieUO avatar Oct 20 '23 11:10 GladieUO

Is this still happening? There was a commit some time ago which introduced z map tile averaging

cbnolok avatar Aug 28 '24 18:08 cbnolok

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.

image image image

GladieUO avatar Aug 28 '24 18:08 GladieUO

image This can happen if custom npcs have no height and there is a gap betwen terrain and the static. (i think)

Tolokio avatar Aug 28 '24 19:08 Tolokio

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

image

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.

Tolokio avatar Aug 28 '24 23:08 Tolokio

Yea I fixed this one long time ago. My dumbass activated in all regions noblockheight flag.

GladieUO avatar Aug 29 '24 08:08 GladieUO

So, all issues of this post are fixed? should it be closed?

Tolokio avatar Aug 29 '24 15:08 Tolokio