Skip to content

Conversation

@CoolDude034
Copy link

@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:
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
sniperrifle_offset_x the 'x' offset without attachment
sniperrifle_offset_y the 'y' offset without attachment
sniperrifle_offset_z the 'z' offset without attachment
sniperrifle_offset_x_attachment the 'x' offset with attachment
sniperrifle_offset_y_attachment the 'y' offset with attachment
sniperrifle_offset_z_attachment the 'z' offset with attachment
sniperrifle_despawn_t time it takes for the prop rifle to despawn when it's out of sight
sniperrifle_use_attachment whether the rifle should be attached to an attachment point or guessing with angles
sniperrifle_attachment_point which attachment to attach to
sv_npc_sniper_use_aiming_anims if the sniper gets the bits_CAP_AIM_GUN capability
sv_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


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