Lua functions

PerformCameraShake

Registered in this checkout as EQ2Emu_lua_PerformCameraShake; implementation found at WorldServer/Lua/LuaFunctions.cpp:318.

Historical signature: PerformCameraShake(…) via current binding

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: PerformCameraShake(player, intensity, direction)

Description: Sends a camera-shake packet to a connected player in a zone. Intensity passes through to the client; direction is included only above client version 561.

Parameters: player: connected player spawn in a zone. intensity: float; client behavior expects approximately 0.01–1.0. Optional byte direction defaults to 0.

Returns: None. Invalid player, missing connection, or unavailable packet produces no shake.

Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.

Checked example

Active call in a local runtime Lua script. The omitted direction resolves to zero. This is a contextual call pattern, not a tested standalone script.

PerformCameraShake(Spawn, 0.5)

Evidence: server/SpawnScripts/antonica/qstbellofvhalen.lua:39; binding EQ2Emu_lua_PerformCameraShake.

Current registration: WorldServer/Lua/LuaInterface.cpp.