feat(server.game): route events through a InterestManager (#47)
* feat(server.game): route events through a InterestManager * docs: explain the InterestManager and when to use it * fix(login): carry the authenticated account to the game server so players get distinct characters * fix(protocols.game): decode entity move from capture at opcode 0xE4 with little-endian ids and 16-bit coords * feat(game): make the server authoritative over movement and broadcast steps and turns to nearby players * refactor(game): drop the unused broadcastExcept and isOnline methods
This commit is contained in:
1 parent
3cfbc2169a
commit
4b533bd099
28 files changed
+702
-341
No files matched your search
@@ -1,12 +1,12 @@
|
||||
package de.fiereu.openmmo.common.enums
|
||||
|
||||
enum class Direction {
|
||||
DOWN,
|
||||
UP,
|
||||
LEFT,
|
||||
RIGHT,
|
||||
DIVE,
|
||||
EMERGE;
|
||||
enum class Direction(val dx: Int, val dy: Int) {
|
||||
DOWN(0, 1),
|
||||
UP(0, -1),
|
||||
LEFT(-1, 0),
|
||||
RIGHT(1, 0),
|
||||
DIVE(0, 0),
|
||||
EMERGE(0, 0);
|
||||
|
||||
fun opposite(): Direction =
|
||||
when (this) {
|
||||
|
||||
Reference in new issue
Block a user