Magic

Magic

190k Downloads

Teleportation spells allow you to pass through blocks

Ferocimo opened this issue ยท 25 comments

commented

Hello,

Teleportation spells, like blink, allow you to pass through blocks, under certain circumstances.

For instance, it can allow a player to teleport on top of this structure, when he is underneath it :

http://www.noelshack.com/2018-48-2-1543352769-2018-11-27-22-04-44.png

You have to aim precisely at the angle.

This is a big concern on PVP servers where this can allow a player to enter other player's bases.

commented

The issue is still there even with your modification ; however in light of what you said, you might want to try it not only with our config, but with this set as the "default spell" :

https://hastebin.com/ikudedahek.cpp

(this is from the spells.default.yml)

I'm standing at the bottom of the wall, on the wood (on my screenshot).

commented

With our current config you can't, in any way, pass through a plain wall with Blink. The only way is doing this specific setup, shown on the screenshot.

commented

Do you have something like example: "" or load_default_spells: false in your config.yml? In other words have you turned off the default configs some how?

commented

Absolutely, load_default_spells: false.

commented

Ah, ok, roger that... well then forget everything I said ๐Ÿ˜‚

While I have your attention, what version are you on?

I'll try your configs again without the defaults this time.

commented

I figured ! :p

We are on 7.6.18-SNAPSHOT-5622810

commented

Well sadly I'm having a lot of trouble reproducing the effect with your configs- I'm using the "defaults" one you pasted but it should be identical anyway since there's nothing else getting added.

Here's my setup and attempts:

https://gfycat.com/EmptyPlasticAplomadofalcon

From the description of your more recent post, one thing you could try is changing these two parameters in the base blink spell:

    vertical_range: 0
    ledge_range: 0

Though I would really like to know what the root cause is. Without passthrough enabled those should only let you get up on ledges when you have line of sight to the top of it, such as in the video when I intentionally teleported up to the ledge.

commented

I believe you're not using blink|6. "safe" needs to be set to false.

commented

I was, but safe: false wasn't set in the configs you pasted. That part wasn't needed for the first test, was it?

level 6

(I changed the name of the spell to make sure I was avoiding conflicts with the base blink)

commented

Adding safe: false does allow me to reproduce the problem though!

commented

blink|6:
parameters:
safe: false
cooldown: 30000
costs:
mana: 150

It's written in the first pastebin I sent !

commented

And yes, as I said previously :

Obviously this only happens if safe is set to false (so in blink|6, in my config).

So this is a requirement.

commented

Strange that it does not show in the spells.defaults.yml you pasted then

blink|5:
  upgrade_required_path: sorcier
  upgrade_required_casts: 400
  parameters:
    allow_passthrough: false
    range: 32
    cooldown: 32000
  costs:
    mana: 140
  enabled: true
blink|6:
  parameters:
    allow_passthrough: false
    cooldown: 30000
  costs:
    mana: 150
  enabled: true

But that is a good lead anyway, should hopefully be fixable.

commented

Yes since the spells.defaults.yml is theorically not used it is not exactly the same as the version we have in the spells.yml.

That's good news ! Let me know if you find a fix.

commented

You will probably need to disable blink if that's a big concern for you. Lower-level blink is meant to avoid this, but it levels up in ways that allow it to intentionally pass through walls.

I will leave this open because it does sound like you've found a bug, but I'm not sure how quickly it will get fixed so your best bet is to disable that spell for now.

commented

Actually I forgot to mention I edited the spell a bit.
Here is the config :
https://pastebin.com/HFcdcbc0

I completely removed any possibility to pass through walls, technically.

commented

Oh, ok, good catch!

Well it does have code that's meant to prevent players from sliding through diagonals and other tricky things but it seems like something is broken there. If it's a concern I would disable it to be safe, and if I'm ever able to reproduce and fix the issue I'll come back and let you know here.

commented

I managed to track exactly how to reproduce the issue 100% of the time. It doesn't even has to involve "thin angles", the setup just needs to be something like that :

http://www.noelshack.com/2018-48-2-1543355526-2018-11-27-22-51-44.png

If you're on the ground and you aim on the blue block, you will appear on top of the structure. I only put that block in blue but that's actually the whole line : aim one block below the last block of the wall before the ceiling, and you will appear on top of the ceiling.

commented

Gathering more data :

http://www.noelshack.com/2018-48-2-1543355969-2018-11-27-22-59-17.png

This bug allows players to appear on top of the andesite ceiling, but only if it is less than 5 blocks of width like on the left part (green line). If the ceiling is six blocks or more like on the right part (red line), the bug will not occur.

commented

Obviously this only happens if safe is set to false (so in blink|6, in my config).

commented

I tried that out but couldn't reproduce- where are you standing?

screenshot

Now here's a thing though, I couldn't reproduce with Blink level 1- but I could reproduce the problem with Blink level 6, including with your customizations.

So now may be a good time to ask, are you still loading the "survival" example?

If so it's important to know that your changes are basically layered on top of the default survival configs, they don't outright replace them.

So for instance if you want to change the range of blink all you really need in your configs is like

blink:
  parameters:
    range: 32

You normally don't want to copy the whole thing unless you're planning on going full-custom, in which case you probably don't want to continue to load the survival configs at all, but rather copy all of the spell files and then customize. This isn't super recommended since you won't get updates anymore, but it is easier for some people to manage, since you don't have to worry about what's getting added on underneath your configs.

Sooooooo that all said, when you edited blink and just removed lines from the upgrades like "allow_passthrough: true" you didn't turn off passthrough, since it will still pull that line from the default configs. You can see this in effect, you don't actually need any of these squirrely mechanics- just walk straight up to a wall and blink through it! That's the intentional passthrough feature working.

I think what you want to do then is add back in the stuff you removed, but kind of blank it out, like this:

blink|5:
  upgrade_required_path: sorcier
  upgrade_required_casts: 400
  parameters:
        allow_passthrough: false

Here's a fully-working modified version of your configs, though I suspect a lot of it isn't necessary:

https://hastebin.com/hutocaguro.cpp

commented

It fixed the problem for me, using your configs.. sorry, that's probably all I can do here!

commented

@NathanWolf Sorry for the delay ; it doesn't change anything unfortunately.

commented

Okay my bad it works perfectly indeed, well done ! And thank you, of course.