Joriku
Working in the mines, need something?
Ops, I was a bit drunk when I wrote this 
Rephrased
When creating a cast system, how do we handle the cast viewer, is it a real player as a "ghost", or is it an observer?
Real player: without functionallity
Or do we run it as an observer, seems to be a bit harder to achieve.
While I am trying to create a cast system, I cannot get the cast viewer to join the cast without losing its connection
The best one I had, it went inside, then lost connection.
Right now, it keeps crashing the server.
Caster: Enables cast
Viewer: Enters cast
Viewer: Waiting, loses connection.
Caster: Auto ended their cast
I may be doing it the wrong direction, any thoughts?
I can provide code snippets
Previous server logs:
[2026-04-01 19:24:33.678] [info] Jori Testing has logged in. (Protocol: 1412)
[Cast System] Player Jori Testing (ID: 10) has enabled casting
[2026-04-01 19:24:53.094] [info] [Cast System] Spectator attempting to join cast for player 'Jori Testing' (ID: 10)
[2026-04-01 19:24:53.095] [info] [Cast System] Database query result for player Jori Testing (ID: 10): cast_status = 1
[2026-04-01 19:24:53.096] [info] [Cast System] Spectator joining cast for player Jori Testing (ID: 10), cast_status: 1
[2026-04-01 19:24:53.096] [info] [Cast System] Registering caster Jori Testing (ID: 10) - casting enabled but not registered
[2026-04-01 19:24:53.096] [info] [CastManager] Registered caster Jori Testing (ID: 10)
[2026-04-01 19:24:53.096] [info] [Cast System] registerCaster returned successfully
[2026-04-01 19:24:53.096] [info] [Cast System] foundPlayer is still valid after registerCaster
[2026-04-01 19:24:53.096] [info] [Cast System] Successfully stored caster data for Jori Testing (GUID: 10, Runtime ID: 268435466)
[2026-04-01 19:24:53.096] [info] [Cast System] Verified caster Jori Testing has active client connection (read-only check)
[2026-04-01 19:24:53.096] [info] [Cast System] Exited try-catch block, about to set spectator flags
[2026-04-01 19:24:53.096] [info] [Cast System] Successfully accessed self->m_isCastViewerBool
[2026-04-01 19:24:53.096] [info] [Cast System] Setting spectator flags...
[2026-04-01 19:24:53.096] [info] [Cast System] Set m_isCastViewerBool = true
[2026-04-01 19:24:53.096] [info] [Cast System] Set m_spectatedPlayer
[2026-04-01 19:24:53.096] [info] [Cast System] Set player = nullptr
[2026-04-01 19:24:53.096] [info] [Cast System] Starting to send initial world snapshot...
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] Sending time packet (0x1F) - lightHour: 584, length: 5
[2026-04-01 19:24:53.096] [info] [Cast System] Sent time packet
[2026-04-01 19:24:53.096] [info] [Cast System] Preparing to send pending state packet
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] Sending pending state packet (0x0A) - length: 1
[2026-04-01 19:24:53.096] [info] [Cast System] Sent pending state packet
[2026-04-01 19:24:53.096] [info] [Cast System] Preparing to send enter world packet
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] Sending enter world packet (0x0F) - length: 1
[2026-04-01 19:24:53.096] [info] [Cast System] Sent enter world packet
[2026-04-01 19:24:53.096] [info] [Cast System] About to send basic game data packet
[2026-04-01 19:24:53.096] [info] [Cast System] Calling sendBasicDataForPlayer...
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] About to send basic game data packet (0x9F) via sendBasicDataForPlayer()
[2026-04-01 19:24:53.099] [info] [Cast System] Sent basic game data packet
[2026-04-01 19:24:53.099] [info] [Cast System] Verifying safeFoundPlayer before map description...
[2026-04-01 19:24:53.099] [info] [Cast System] About to send map description...
[2026-04-01 19:24:53.099] [info] [Cast System] Calling sendMapDescriptionForPlayer...
[2026-04-01 19:24:53.099] [info] [Cast System] [PACKET OUT] About to send map description (0x64) - position: x=32367, y=32232, z=7
Segmentation fault (core dumped)
Issue has been solved, sent wrong packet from what it's expecting.
Going for a ghost player that is read-only, cannot interact with the players actions, chat etc.
Rephrased
When creating a cast system, how do we handle the cast viewer, is it a real player as a "ghost", or is it an observer?
Real player: without functionallity
Or do we run it as an observer, seems to be a bit harder to achieve.
While I am trying to create a cast system, I cannot get the cast viewer to join the cast without losing its connection
The best one I had, it went inside, then lost connection.
Right now, it keeps crashing the server.
Caster: Enables cast
Viewer: Enters cast
Viewer: Waiting, loses connection.
Caster: Auto ended their cast
I may be doing it the wrong direction, any thoughts?
I can provide code snippets
Previous server logs:
[2026-04-01 19:24:33.678] [info] Jori Testing has logged in. (Protocol: 1412)
[Cast System] Player Jori Testing (ID: 10) has enabled casting
[2026-04-01 19:24:53.094] [info] [Cast System] Spectator attempting to join cast for player 'Jori Testing' (ID: 10)
[2026-04-01 19:24:53.095] [info] [Cast System] Database query result for player Jori Testing (ID: 10): cast_status = 1
[2026-04-01 19:24:53.096] [info] [Cast System] Spectator joining cast for player Jori Testing (ID: 10), cast_status: 1
[2026-04-01 19:24:53.096] [info] [Cast System] Registering caster Jori Testing (ID: 10) - casting enabled but not registered
[2026-04-01 19:24:53.096] [info] [CastManager] Registered caster Jori Testing (ID: 10)
[2026-04-01 19:24:53.096] [info] [Cast System] registerCaster returned successfully
[2026-04-01 19:24:53.096] [info] [Cast System] foundPlayer is still valid after registerCaster
[2026-04-01 19:24:53.096] [info] [Cast System] Successfully stored caster data for Jori Testing (GUID: 10, Runtime ID: 268435466)
[2026-04-01 19:24:53.096] [info] [Cast System] Verified caster Jori Testing has active client connection (read-only check)
[2026-04-01 19:24:53.096] [info] [Cast System] Exited try-catch block, about to set spectator flags
[2026-04-01 19:24:53.096] [info] [Cast System] Successfully accessed self->m_isCastViewerBool
[2026-04-01 19:24:53.096] [info] [Cast System] Setting spectator flags...
[2026-04-01 19:24:53.096] [info] [Cast System] Set m_isCastViewerBool = true
[2026-04-01 19:24:53.096] [info] [Cast System] Set m_spectatedPlayer
[2026-04-01 19:24:53.096] [info] [Cast System] Set player = nullptr
[2026-04-01 19:24:53.096] [info] [Cast System] Starting to send initial world snapshot...
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] Sending time packet (0x1F) - lightHour: 584, length: 5
[2026-04-01 19:24:53.096] [info] [Cast System] Sent time packet
[2026-04-01 19:24:53.096] [info] [Cast System] Preparing to send pending state packet
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] Sending pending state packet (0x0A) - length: 1
[2026-04-01 19:24:53.096] [info] [Cast System] Sent pending state packet
[2026-04-01 19:24:53.096] [info] [Cast System] Preparing to send enter world packet
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] Sending enter world packet (0x0F) - length: 1
[2026-04-01 19:24:53.096] [info] [Cast System] Sent enter world packet
[2026-04-01 19:24:53.096] [info] [Cast System] About to send basic game data packet
[2026-04-01 19:24:53.096] [info] [Cast System] Calling sendBasicDataForPlayer...
[2026-04-01 19:24:53.096] [info] [Cast System] [PACKET OUT] About to send basic game data packet (0x9F) via sendBasicDataForPlayer()
[2026-04-01 19:24:53.099] [info] [Cast System] Sent basic game data packet
[2026-04-01 19:24:53.099] [info] [Cast System] Verifying safeFoundPlayer before map description...
[2026-04-01 19:24:53.099] [info] [Cast System] About to send map description...
[2026-04-01 19:24:53.099] [info] [Cast System] Calling sendMapDescriptionForPlayer...
[2026-04-01 19:24:53.099] [info] [Cast System] [PACKET OUT] About to send map description (0x64) - position: x=32367, y=32232, z=7
Segmentation fault (core dumped)
Issue has been solved, sent wrong packet from what it's expecting.
Going for a ghost player that is read-only, cannot interact with the players actions, chat etc.
Last edited: