-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auto shotgun swep #16
Conversation
… changed the dmg output of the gun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code could greatly benefit from extracting constant values you use in the attack functions to constant variables grouped at some part of the file (preferably the top)
Also, is it necessary for the cat picture to have a material bound to it?
Forgot to mention in the original review but I think you should rename the weapon file to |
LGTM. The PR will be merged once someone can do QA and it passes without any blockers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like you've added the resources to be downloaded by clients using https://wiki.facepunch.com/gmod/resource
|
@yousifhub can you please add the unrelated changes to separate feature branches and PRs. This should just be for the auto shotgun, and not everything you’re working on. Otherwise we’re forced to merge either everything or nothing. Also, the extra hud isn’t a swep, so it should be in a different repository entirely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine now bar the seemingly unused shoot and reload sounds. Just needs someone to QA (@yogwoggf you have lots of free time and not much experience doing QAs )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these files are unused can they be removed?
Will probably do the QA on the weekend, although, @yousifhub - you do have merge conflicts because you accidently removed el patito from the authors list. |
@yogwoggf merge conflicts resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Result: Failed ❌
Blockers ❌
- When re-equipping the weapon after spawning it from the weapons tab in the spawnmenu, the swep will error locally and cause a lua error. ❌
- The error:
[sweps] addons/sweps/lua/weapons/weapon_autoshotgun.lua:49: attempt to call method 'GiveAmmo' (a nil value) 1. unknown - addons/sweps/lua/weapons/weapon_autoshotgun.lua:49 (x12)
- The error:
- Similar to the first blocker, the entire logic for the giving ammo on the first deploy is broken and doesn't actually run when spawned. ❌
- Furthermore, it's shadowed by the original SWEP logic that is being used anyways (
SWEP.Primary.DefaultClip = 30
) - I would remove it entirely
- Furthermore, it's shadowed by the original SWEP logic that is being used anyways (
- When the clip is empty, the secondary attack (right mouse button) spams the empty click sound each frame, resulting in a discordant sound. ❌
- I'm arguing this is a blocker as it can easily cause someone to get startled if they're using headphones
Warnings ⚠️
- Kill icon is not specified
⚠️ - Causes a warning in the console
- In my opinion, I think it could just be set to the normal shotgun icon
- There is a "cat.vtf" and a "cat.vmt" but also a "cat.jpg" in
materials/
⚠️ - Choose one or the other, it's unnecessary to have different formats, especially as GMod has first-class support for jpegs.
- Your code also flip flops between the vmt and the jpg.
Passed ✅
- Primary fire ✅
- Fires ordinary shotgun bullets
- Takes 1 ammo out of the clip
- Plays fire sound correctly
- Secondary fire ✅
- Fires three shotgun bullets
- Takes 3 ammos out of the clip
- Plays fire sound correctly
- Won't fire if less than 3 ammos in clip
- HUD ✅
- Icon appears correctly in spawnmenu
- Icon appears decently correct in weapon selection (stretched)
- Appearance ✅
- World model is a shotgun
- View model is the normal shotgun
- FoV is correct
- Hold type is shotgun, so correct
Re-QA Result: Passed with Warnings ✅Warnings
|
adding a shotgun that makes the normal hl2 shotgun faster no cocking and faster reload and another version for admins to have fun and does more damage than the non-admin one