hestia-rsps / hestia

An open-source Kotlin game server.
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link

Interaction clipping #129

Open GregHib opened 4 years ago

GregHib commented 4 years ago

Interaction/Strageties are broken and interact-through walls.

Also general improvements:

entity perform Interact(target)
        val route = await(Route())
        val canInteract = route.steps >= 0 && !route.alternative || StepBesideSystem.isNear(entity get Position::class, target get Position::class, 1, 1, true)
        entity perform Face(target get Position::class)
        await(Ticks(1))
        if(!canInteract) {
            entity perform Chat("You can't reach that.")
            return@strongQueue
        }

Is longwinded and should be shortened after #128