Repository navigation
Conversation
…horses Player.attachProp hung a mesh on a joint of a player's body only. Every game finds the body of an attached prop by its network id, and NPCs and horses are found the same way, so they now carry props too: a basket on a back, a lantern in a hand, a pack behind a saddle. - New Npc.attachProp / Npc.detachProp and Horse.attachProp / Horse.detachProp, taking what Player.attachProp takes; the props go with the NPC or horse. - New Prop.attachedBody: the player, NPC or horse a prop hangs on. Prop.attachedTo still names only a player.
This was referenced Nov 26, 2026
Merged
Collaborator
Author
|
Shipped in KCDS 1.2.3 through #358. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
A server asked for props on characters' skeletons ("attach entity to entity, or at least to a bone"). Player.attachProp hung a mesh on a joint of a player's body only. Every game finds the body of an attached prop by its network id, and NPCs and horses are found the same way, so they now carry props too.
Npc.attachProp/Npc.detachPropandHorse.attachProp/Horse.detachProp, taking whatPlayer.attachProptakes (model,jointorhand,position,rotation,scale). The props go with the NPC or horse (removed with it).Prop.attachedBody: the player, NPC or horse a prop hangs on.Prop.attachedTostill names only a player, so C# scripts keep itsPlayertype.How it was tested
node --test Backend/scripting/runtimes/js/props.test.cjs: 14 passed (new: an NPC and a horse carry props on joints and hand slots, detachProp takes only their own, the props go when the NPC is removed or the horse destroyed; attachedBody / attachedTo).build_csharp_sdk.py --check).Checklist
python Dev/tools/format_source.py --checkpasses.