-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## About The Pull Request This pr is a port of: - Mojave-Sun/mojave-sun-13#430 This PR significantly improves recoil (screenshake when shooting guns) because our current recoil sucks ass. Instead of a simple screenshake its now based on the direction you're shooting in. I have also gone ahead and added recoil values to the guns we have in-game right now. Ballistic guns have a recoil value of `1` Energy guns have a recoil value of `0.2` Disablers and the Miniature energy gun have a recoil value of because they're tiny `0.1` This is yet another expansion of the guns and other cool shit pr's like: #520 #455 and #460. ## How Does This Help ***Gameplay***? Feedback to in game actions is always good and guns not having recoil when being shot is just weird. ## How Does This Help ***Roleplay***? Immersion probably ## Proof of Testing <details> <summary>Screenshots/Videos</summary> <!-- Leave the line after this one empty. Embeds like breaking if you don't --> ## Old Recoil https://github.com/Artea-Station/Artea-Station-Server/assets/79924768/3a483a6d-a98f-4ae7-a34e-f4b7750ac7c1 ## New Recoil https://github.com/Artea-Station/Artea-Station-Server/assets/79924768/6bcefbc4-3070-44f6-90ba-45638c99b553 ## New recoil on a disabler https://github.com/Artea-Station/Artea-Station-Server/assets/79924768/7ac9e71a-eebb-4be8-afc3-a971c3d2d013 </details> ## Changelog :cl: qol: Recoil is alot less awful now and is based on the direction you're shooting in. /:cl:
- Loading branch information
Showing
7 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
///Makes a recoil-like animation on the mob camera. | ||
/proc/recoil_camera(mob/M, duration, backtime_duration, strength, angle) | ||
if(!M || !M.client) | ||
return | ||
var/client/sufferer = M.client | ||
strength *= world.icon_size | ||
var/oldx = sufferer.pixel_x | ||
var/oldy = sufferer.pixel_y | ||
|
||
//get pixels to move the camera in an angle | ||
var/mpx = sin(angle) * strength | ||
var/mpy = cos(angle) * strength | ||
animate(sufferer, pixel_x = oldx+mpx, pixel_y = oldy+mpy, time = duration, flags = ANIMATION_RELATIVE) | ||
animate(pixel_x = oldx, pixel_y = oldy, time = backtime_duration, easing = BACK_EASING) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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