#  ![](https://www.realm667.com/media/kunena/topic_icons/realm667_repo/user/rep_approved.png) \[UPDATE\] Sniper Rifle

##

- **DeVloek**
- ![DeVloek's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11145.png?1542216928) Topic Author
- Arachnotron
- ![Arachnotron](https://www.realm667.com/media/kunena/ranks/rank_10_arachno.png)

 Less More- Posts: 416
-
-

   1 year 9 months ago [\#12607](#12607) by DeVloek  *[\[UPDATE\] Sniper Rifle](https://www.realm667.com/forum/closed-submissions/2183-update-sniper-rifle#12607 "Initially I only renamed some sprites (there were conflicts with the War monster), but then I noticed a bug/oversight and that the scope overlay's crosshair isn't accurate, so I made a more thorough...")* was created by *DeVloek*

 Initially I only renamed some sprites (there were conflicts with the War monster), but then I noticed a bug/oversight and that the scope overlay's crosshair isn't accurate, so I made a more thorough update for this weapon, hence a new thread. I also did some balancing since I felt the projectile is a bit weak for such a low fire rate. - streamlined classnames and spritenames
- added BackpackAmount and BackpackMaxAmount to the ammo
- added new scope overlay that aligns better with the GZDoom crosshairs and where the bullet actually hits (moved the old one to the altsprites folder)
- increased minimum damage from 30 to 120 (maximum damage is still 240)
- increased projectile speed from 60 to 180
- aim angle and pitch is now slightly randomized when firing from the hip

Again no Zscript conversion, sorry about that. Maybe next time.

[ https://drive.google.com/file/d/1F9ObOxebZ3VWzaV\_YKRu0acZaY\_nUC\_1/view?usp=sharing](https://drive.google.com/file/d/1F9ObOxebZ3VWzaV_YKRu0acZaY_nUC_1/view?usp=sharing)

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTgzLXVwZGF0ZS1zbmlwZXItcmlmbGU=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **Gothic**
- ![Gothic's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar320.png?1619787674)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 1329
-
-
-

   1 year 9 months ago [\#12640](#12640) by Gothic  Replied by *Gothic* on topic *[\[UPDATE\] Sniper Rifle](https://www.realm667.com/forum/closed-submissions/2183-update-sniper-rifle#12640 "Initially I only renamed some sprites (there were conflicts with the War monster), but then I noticed a bug/oversight and that the scope overlay's crosshair isn't accurate, so I made a more thorough...")*

 The new scope looks nice.
There is a small problem with the code: on my last update I made sure the DECORATE code still worked on Zandronum, but now it crashes due to 2 lines using functions that the port doesn't recognize: - Line 38: arguments beyond spawnheight for A\_FireCustomMissile don't work.
- Line 142: randompick doesn't work either. Also SPRITEFLIP is not a valid flag.

If you were to convert the code to Zscript to include the above changes, and keep the old Decorate file compatible with Zandronum then it would be ok.
Also I forgot to disable the ACTIVATEIMPACT and ACTIVATEPCROSS flags for the casings.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTgzLXVwZGF0ZS1zbmlwZXItcmlmbGU=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **DeVloek**
- ![DeVloek's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11145.png?1542216928) Topic Author
- Arachnotron
- ![Arachnotron](https://www.realm667.com/media/kunena/ranks/rank_10_arachno.png)

 Less More- Posts: 416
-
-

   1 year 9 months ago - 1 year 9 months ago [\#12653](#12653) by DeVloek  Replied by *DeVloek* on topic *[\[UPDATE\] Sniper Rifle](https://www.realm667.com/forum/closed-submissions/2183-update-sniper-rifle#12653 "Initially I only renamed some sprites (there were conflicts with the War monster), but then I noticed a bug/oversight and that the scope overlay's crosshair isn't accurate, so I made a more thorough...")*

 If I were to convert this gun to Zscript, I'd probably overhaul it completely, ie. get rid of all the extra states and control actors which wouldn't be necessary with Zscript. But since I'm pretty busy with other things atm, I only removed the offending code. Which wasn't that important anyway, it only randomly flipped the casing sprite and added inaccuracy when firing from the hip. The horizontal inaccuracy is still present (a little bit stronger now), but tbh it's kinda pointless now with auto-aim enabled. One could add the WEAPON.NOAUTOAIM flag, but I'm not sure if that's a good idea so this will have to do for now.
Download in the op is updated, I hope this version works with Zandronum now. If you're fine with putting this on hold for a while, I might have more time to look into zscriptification sometime next week.

Oh I almost forgot, I removed the **projectile** combo property from the casing, instead I gave it the MISSILE and NOTELEPORT flags which should suffice, no more need to disable all the unwanted flags.

edit:
fixed a couple more things - replaced all the **"####" "#" 0** frames with **TNT1 A 0** (not sure what the purpose of that was)

- projectile now spawns blood instead of a puff when hitting a bleeding actor
- increased slot priority so the SniperRifle is now selected after the SSG but before the shotgun.

 Last edit: 1 year 9 months ago by DeVloek.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTgzLXVwZGF0ZS1zbmlwZXItcmlmbGU=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **Gothic**
- ![Gothic's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar320.png?1619787674)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 1329
-
-
-

   1 year 9 months ago [\#12662](#12662) by Gothic  Replied by *Gothic* on topic *[\[UPDATE\] Sniper Rifle](https://www.realm667.com/forum/closed-submissions/2183-update-sniper-rifle#12662 "Initially I only renamed some sprites (there were conflicts with the War monster), but then I noticed a bug/oversight and that the scope overlay's crosshair isn't accurate, so I made a more thorough...")*

 [ Updated](https://www.realm667.com/index.php?option=com_content&view=article&id=694)

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTgzLXVwZGF0ZS1zbmlwZXItcmlmbGU=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

[Powered by](https://www.realm667.com/forum/credits) [Kunena Forum](https://www.kunena.org)
