QtCraft API C++ classes QML types Handbook

QcMsg::SoundEvent Struct

struct QcMsg::SoundEvent

Server -> client: a sound at a world position (block broken, creature hurt, furnace crackling). More...

Header: #include <common/protocol/QcWorldMessages.h>

Public Variables

QString key
float pitch
QcVec3 position
float volume

Static Public Members

const qsizetype maxKeyLength
const float maxPitch
const float maxVolume
const float minPitch

Detailed Description

The client picks the loudness and the side from its own distance and view direction.

Member Variable Documentation

QString SoundEvent::key

The sound's key in the content; not empty.

QcVec3 SoundEvent::position

Where it sounds.