otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.59k stars 1.06k forks source link

Add a console warning for invalid (non walkable) next positions #3156

Open EPuncker opened 4 years ago

EPuncker commented 4 years ago

I think we all already went thru a similar situation were players get stuck in some part of the map... a hole that leads you nowhere... a teleport that leads you to somewhere you can't move and so on... and its hard to figure it out as a owner if they don't report it, or don't even know how they got there in the first place, so here is my suggestion (NO MECHANIC CHANGES) : add a console warning with the position when a player step on it so we can be aware of such situations.

for example in these functions:

https://github.com/otland/forgottenserver/blob/master/data/lib/core/position.lua#L12-L48 https://github.com/otland/forgottenserver/blob/master/data/lib/core/tile.lua#L17-L38 stairs and holes

to prevent this: 2020-08-06 13_36_30 depois

a warning like [Warning - Position:moveUpstairs] Invalid next position at ( 127 / 60 / 7 ) should be enough

BahamutxD commented 4 years ago

I think this would need to be optional to avoid spam on console as there are maps that deliberately use stairs/holes/blank teleports that lead nowhere or to non-pathable tiles as a way to trick/tease players.

EPuncker commented 4 years ago

I think this would need to be optional to avoid spam on console as there are maps that deliberately use stairs/holes/blank teleports that lead nowhere or to non-pathable tiles as a way to trick/tease players.

but those will only trigger if the player actually walk over them

BahamutxD commented 4 years ago

I think this would need to be optional to avoid spam on console as there are maps that deliberately use stairs/holes/blank teleports that lead nowhere or to non-pathable tiles as a way to trick/tease players.

but those will only trigger if the player actually walk over them

Missunderstood you. Thought it was something that would be checked upon server start/map load.

Nevermind me!