Skip to content

client: student/NPC proxy spawning#12

Merged
Kheartz merged 1 commit into
mainfrom
student_spawn
Jun 13, 2026
Merged

client: student/NPC proxy spawning#12
Kheartz merged 1 commit into
mainfrom
student_spawn

Conversation

@Kheartz

@Kheartz Kheartz commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Spawns a native Biped_Character dressed from base-game assets (CMBH outfit + head/hands skin) with harvested swatch MID parameters and a raw idle AnimSequence without need for StudentManager or live NPCs. Driven by the game's reflection (ProcessEvent + FProperty offsets); spawns via native UWorld::SpawnActor (FVector+FRotator overload). Playground "Students" panel (count, Spawn/Despawn); buttons set thread-safe flags, work runs on the game thread via ProcessPending() from Playground_Tick.

Reflection plumbing lives in shared core/ue4_reflection.{h,cpp} and core/ue4_natives.h (single source of truth for the native typedefs/externs; replaces playground.cpp's local FActorSpawnParameters copy). Registry uses GUObjectArray index + serial number + pending-kill checks; active count is mirrored atomically for the render thread; despawn retries while the world is unavailable instead of dropping live actors.

Spawns a native Biped_Character dressed from base-game assets (CMBH outfit +
head/hands skin) with harvested swatch MID parameters and a raw idle
AnimSequence without need for StudentManager or live NPCs. Driven by the
game's reflection (ProcessEvent + FProperty offsets); spawns via native
UWorld::SpawnActor (FVector+FRotator overload). Playground "Students" panel
(count, Spawn/Despawn); buttons set thread-safe flags, work runs on the game
thread via ProcessPending() from Playground_Tick.

Reflection plumbing lives in shared core/ue4_reflection.{h,cpp} and
core/ue4_natives.h (single source of truth for the native typedefs/externs;
replaces playground.cpp's local FActorSpawnParameters copy). Registry uses
GUObjectArray index + serial number + pending-kill checks; active count is
mirrored atomically for the render thread; despawn retries while the world
is unavailable instead of dropping live actors.
@Kheartz Kheartz merged commit c8979e2 into main Jun 13, 2026
1 check passed
@Kheartz Kheartz deleted the student_spawn branch June 13, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant