Make map-spawned knife entities respawn like other weapons (#163) - #315
Draft
darkshade9 wants to merge 4 commits into
Draft
Make map-spawned knife entities respawn like other weapons (#163)#315darkshade9 wants to merge 4 commits into
darkshade9 wants to merge 4 commits into
Conversation
Knife pickup entities placed in maps had no respawn scheduling after being collected, making them one-shot pickups unlike every other weapon in the game. This aligns the knife with grenade/weapon pickup semantics: after pickup of a world-placed knife, the entity is hidden and scheduled to reappear using weapon_respawn (matching the admin-configured interval used by all other weapon pickups). Player-dropped knives are unaffected and continue following the existing dropped-item lifecycle. The DF_WEAPONS_STAY DM flag is respected exactly as it is for grenades. Closes #163 Co-Authored-By: PrismConductor worker <noreply@anthropic.com>
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.
Summary
weapon_knifeentities now respawn after pickup usingweapon_respawntiming, matching the behaviour of every other weapon pickup in the game.DF_WEAPONS_STAYDM flag is respected: when set, the knife entity getsFL_RESPAWNinstead of a timedSetRespawn, exactly as grenades handle it.Files modified
src/action/p_weapon.c— added 7 lines to theKNIFE_NUMpickup branch insidePickup_WeaponVerification
ninja -C builddir gamearm64.dylibtests/e2e/startup.spec.tsManual verification scenarios (per plan §4):
weapon_respawnseconds.knife_max; entity state unchanged.Commit tier
Tier 2b (local unsigned commit + push) — repo does not enforce signed commits on
aqtion.Notes
masterby the conductor (localorigin/HEAD → master) butaqtionis the GitHub default branch. A merge commit bringing inorigin/aqtionprecedes the feature commit; this PR is targeted ataqtion.g_items.cneeded no changes — theSetRespawn/FL_RESPAWNmachinery is already correct and shared.Closes #163