Skip to content

PR: Unhidden Snipers#487

Open
CoolDude034 wants to merge 4 commits intomapbase-source:developfrom
CoolDude034:sniper_pr
Open

PR: Unhidden Snipers#487
CoolDude034 wants to merge 4 commits intomapbase-source:developfrom
CoolDude034:sniper_pr

Conversation

@CoolDude034
Copy link
Copy Markdown

@CoolDude034 CoolDude034 commented Nov 1, 2025

Adds unhidden snipers that have visible weapons attached to them and are able to rotate/look at the target
Do note, they still shouldn't be used from close and preferrably placed far away, ontop of a rooftop due to the aiming is bit weird and the weapon placement needs adjustment with cvars (tho i think it depends on the model itself).
Additionally, the sniper can be damaged by regular weapons.

This PR might be useful to use npc_sniper as an regular enemy

Convars added:
npc_sniper_riflemodel override the weapon model to be used by the sniper, default is the AR2. You might need to mess with the x,y,z convars to get it right
npc_sniper_rifle_offset_x the 'x' offset without attachment
npc_sniper_rifle_offset_y the 'y' offset without attachment
npc_sniper_rifle_offset_z the 'z' offset without attachment
npc_sniper_rifle_offset_x_attachment the 'x' offset with attachment
npc_sniper_rifle_offset_y_attachment the 'y' offset with attachment
npc_sniper_rifle_offset_z_attachment the 'z' offset with attachment
npc_sniper_rifle_despawn_t time it takes for the prop rifle to despawn when it's out of sight after the sniper dies
npc_sniper_rifle_use_attachment whether the rifle should be attached to an attachment point or guessing with angles
npc_sniper_rifle_attachment_point which attachment to attach to
npc_sniper_use_aiming_anims if the sniper gets the bits_CAP_AIM_GUN capability
npc_sniper_should_rotate_body if the sniper should rotate it's body to aim at the target
sk_npc_sniper_easy_delay the firing/paint delay on Easy difficulty when it has SF_SNIPER_DELAY_FIRE_ON_EASY spawn flag on.


Does this PR close any issues?

  • No, it's a feature request

PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

Screenshots

20251101100603_1
20251101100932_1
20251101100936_1

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