Files
odinsea-elixir/lib/odinsea/game/movement/absolute.ex
2026-02-14 23:12:33 -07:00

40 lines
1.1 KiB
Elixir

defmodule Odinsea.Game.Movement.Absolute do
@moduledoc """
Absolute life movement - normal walking, flying, etc.
Ported from Java AbsoluteLifeMovement.java
This is the most common movement type for:
- Normal walking (command 0)
- Flying (commands 37-42)
- Rush skills (when not instant)
Contains position, velocity, and offset information.
"""
@type t :: %__MODULE__{
command: integer(), # Movement command type (0, 37-42)
x: integer(), # Target X position
y: integer(), # Target Y position
vx: integer(), # X velocity (pixels per second)
vy: integer(), # Y velocity (pixels per second)
unk: integer(), # Unknown short value
offset_x: integer(), # X offset
offset_y: integer(), # Y offset
stance: integer(), # New stance/move action
duration: integer() # Movement duration in ms
}
defstruct [
:command,
:x,
:y,
:vx,
:vy,
:unk,
:offset_x,
:offset_y,
:stance,
:duration
]
end