Messages Vehicle - themeldingwars/Documentation GitHub Wiki

Vehicle messages are a reduced version of the Character set. A vehicle is driven by a client, so it has controllers like a character does, but it has no weapons of its own and no equipment, so the whole firing side of the character protocol is missing.

Commands

MovementInput

  • On the Vehicle BaseController.
  • Position, rotation quaternion, direction, a ushort movement state and a uint32 time.
  • Sent continuously while driving, the same way the Character version is.

MovementInputFake

  • On the Vehicle BaseController.
  • Same as MovementInput with an extra sbyte before the movement state.

SinAcquire_Source

  • On the Vehicle BaseController.
  • A single target entity id.

ReceiveCollisionDamage

  • On the Vehicle BaseController.
  • A ushort short time and an optional entity id behind a HaveEntity byte.
  • The client reports its own collisions. When the vehicle hits several entities at once, one message is sent per entity rather than a list.

ActivateAbility

  • On the Vehicle CombatController.
  • A uint32 time, an ability slot index, a byte counted array of target entity ids, and a TraceAbilities byte that the traceAbilities console command toggles.

DeactivateAbility

  • On the Vehicle CombatController.
  • A uint32 time and an ability slot index.

SetWaterLevelAndDesc

  • On the Vehicle BaseController.
  • A single byte, which the server writes straight to the WaterLevelAndDesc shadow field on the Vehicle ObserverView and BaseController.

SetEffectsFlag

  • On the Vehicle BaseController.
  • Two bytes. When the first is 0x01, the second is the headlight state, 0x00 off and 0x01 on. Whether the first byte selects which effect is being toggled has not been confirmed.
  • The second byte is what ends up in the EffectsFlags shadow field on the Vehicle ObserverView, which is how other players see your headlights.

Events

AbilityActivated

  • On the Vehicle CombatController.
  • An apt::AbilityData id and a uint32 time.

AbilityFailed

PublicCombatLog

  • On the Vehicle CombatController.
  • An int32 flag followed by a combat log message when the flag is 1.

CurrentPoseUpdate

  • On the Vehicle MovementView, from GSS version 9 onwards.
  • Carries a pose update struct, the same one the Character MovementView uses.

TookDebugWeaponHitPublic

  • On the Vehicle CombatView.
  • Carries a debug weapon hit struct. Only relevant with debugweapon enabled, see Debug Traces for what the client does with it.

ForcedMovement

  • On the Vehicle CombatController.
  • Carries a forced movement struct, e.g. being pushed by an explosion.

ForcedMovementCancelled

  • On the Vehicle CombatController.
  • An apt::BaseCommandDef id and a ushort short time.

FlipPunch

  • On the Vehicle CombatController.
  • Two Vector3 values, presumably a position and a direction.
  • The purpose is unconfirmed. The name suggests the impulse used to right an overturned vehicle, but nothing has been observed sending or acting on it.

DebugMovementUpdate

  • On the Vehicle MovementView, from GSS version 9 onwards.
  • A byte, then position, rotation, direction, a ushort that is probably the state and a uint32 that is probably the time, i.e. the same shape as MovementInput with a leading byte.
  • Only sent with movement debugging enabled, see Debug Traces.