Messages Turret - themeldingwars/Documentation GitHub Wiki
Turret messages mirror the Character combat ones almost exactly, which makes sense given a manned turret is a weapon the player is driving. Where the behaviour is the same, the Character page is the fuller description.
Commands
Sent by the client on the Turret BaseController.
PoseUpdate
- A quaternion and a
uint32time. - The turret equivalent of the Character
MovementInput: it is the only thing a turret can "move", so aiming it is the whole pose.
FireBurst
- A quaternion and a
uint32time. - Sent when the player presses fire. Unlike the Character version this one carries the aim with it rather than relying on a separate pose update.
FireEnd
- A
uint32time. - Sent when the player releases fire.
FireWeaponProjectile
- A
uint32time, an aim vector, and an optional second vector behind aHaveMoreDatabyte. - Sent when the local weapon simulation believes a new projectile should exist. The server can turn this into WeaponProjectileFired for the remote Turret ObserverView.
ReportProjectileHit
- Sent when the local projectile simulation believes a projectile has hit something.
- Contents: a
ushorttrace ref (the low half of the id used to group traces in a debugweapon trace), aushortshort time, a byte that is usually1, the hit direction quantised into threesbytes, a half float distance along the ray, and aushortphysics material id taken from the userdata of the ragdoll part that was hit. - The same caveats as the Character version apply: it does not identify the target directly and does not always trigger.
Events
Sent by the server on the Turret ObserverView.
WeaponProjectileFired
- Identical contents to FireWeaponProjectile: time, aim, and an optional second vector.
- This is how everyone other than the shooter learns that the turret fired.