Skip to content

Add penguin weapon support (OP4, ID 26)#80

Merged
jkivilin merged 1 commit intomasterfrom
add-penguin-weapon-op4
Mar 4, 2026
Merged

Add penguin weapon support (OP4, ID 26)#80
jkivilin merged 1 commit intomasterfrom
add-penguin-weapon-op4

Conversation

@jkivilin
Copy link
Member

@jkivilin jkivilin commented Mar 3, 2026

Summary

  • Add OP4 penguin weapon (ID 26, snark reskin) with weapon select, fire delay, monster entity detection, and enemy search skip
  • Weapon config mirrors snark: WEAPON_THROW, range 128-800, SKILL3, ammo on repickup
  • No waypoint flag assigned (all 31 usable bits in signed int are taken; penguin is rare)
  • Fix GetWeaponSelect to prefer entries matching the active submod when multiple weapons share the same ID (penguin and Arena 9mmsilenced both use ID 26)

ID 26 collision note

Penguin (OP4) and 9mmsilenced (HL:Arena) both use weapon ID 26. This is correct — the engine assigns the same ID slot to different weapons in different mods. They never coexist at runtime since supported_submods filters them (WEAPON_SUBMOD_OP4 vs WEAPON_SUBMOD_ARENA). Penguin is not present in HL:Arena. GetWeaponSelect is updated to be submod-aware so it returns the correct entry for the active mod.

Test plan

  • Cross-compile build passes (make test with i686-linux-gnu toolchain)
  • Verify penguin pickup/throw works in OP4 multiplayer

@jkivilin jkivilin force-pushed the add-penguin-weapon-op4 branch 5 times, most recently from 554e26c to c192fe9 Compare March 3, 2026 17:56
Penguin is an Opposing Force multiplayer weapon (snark reskin) that was
missing from jk_botti. Add weapon definition, fire delay, monster entity
detection, and enemy search skip logic, mirroring snark behavior.

Penguin shares weapon ID 26 with HL:Arena's 9mmsilenced. Fix
GetWeaponSelect to prefer entries matching the active submod when
multiple weapons share the same ID.
@jkivilin jkivilin force-pushed the add-penguin-weapon-op4 branch from c192fe9 to 891d261 Compare March 3, 2026 17:57
@jkivilin jkivilin merged commit 1510366 into master Mar 4, 2026
5 checks passed
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