Skip to content
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

[HL] Bugs regarding standard weapons #617

Closed
UCyborg opened this issue Feb 26, 2013 · 31 comments
Closed

[HL] Bugs regarding standard weapons #617

UCyborg opened this issue Feb 26, 2013 · 31 comments

Comments

@UCyborg
Copy link

UCyborg commented Feb 26, 2013

Crowbar

If you try to beat dead body with the crowbar, animation doesn't play and crowbar is rapidly hitting it until it gets gibbed. Also if cl_lw is disabled, swinging with it through the air makes it look like the animation and accompanying sound restart in the middle of it before they finish.

Shotgun

Holding the +attack button prevents cocking sound from being heard after firing a shot, however it starts if you release the button while animation is still playing.

Gluon gun

Beams fired from it look completely different, depending on the cl_lw setting. It looks correct with cl_lw disabled (but only in singleplayer, see comments below for details).

Trip mine

The viewmodel appears zoomed in with cl_lw disabled right after you select it from inventory. It appears normal after you place one mine.

Rocket launcher

After you fire a rocket and continue to hold +attack button after rocket has exploded, click sound (357_cock1.wav) loops rapidly, instead of just playing once. With cl_lw enabled, multiple instances of that sound are looping.

Python

Similar problem as with rocket launcher, except that click sound is looping slower and weapon prediction attempts to start reload animation with every click.

@Matthaiks
Copy link

Another issue, the gluon gun should make an energy cloud. Just look at it:

http://www.youtube.com/watch?v=uKkJPFmDW9Q&t=3m28s

@UCyborg
Copy link
Author

UCyborg commented Feb 26, 2013

Yes, both problems (intensity of the beam and absence of energy cloud) appear with weapon prediction enabled (cvar cl_lw), which is default. When you turn it off, it's okay, but I don't think prediction is supposed to have effect on behavior of the beam.

@UCyborg UCyborg closed this as completed Feb 26, 2013
@UCyborg UCyborg reopened this Feb 26, 2013
@UCyborg
Copy link
Author

UCyborg commented Feb 26, 2013

PS: my bad, thought close button brings you back to Issues page.

@Matthaiks
Copy link

Strange, I don't have an energy cloud at all. cl_lw only changes an intenisty of the beam in my case.

@ghost ghost self-assigned this Feb 26, 2013
@UCyborg
Copy link
Author

UCyborg commented Feb 26, 2013

Oh, interesting, I just tried gluon gun in both singleplayer and multiplayer and these are my results:

Singleplayer

cl_lw 0 - darker beam, makes energy cloud (the desired behavior)
cl_lw 1 - brighter beam, no energy cloud

Multiplayer

cl_lw 0 - darker beam, no energy cloud
cl_lw 1 - brighter beam, no energy cloud

@Matthaiks
Copy link

Your results are correct. I forgot to check the single player.

@SamVanheer
Copy link

SamVanheer commented Sep 15, 2016

The crowbar issue happens because dead entities being hit causes it to skip the code that sets the delay before the next attack.
See this if statement:

if ( !pEntity->IsAlive() )

The Egon gun sprite issue happens because the client doesn't handle it if cl_lw is on.

For multiplayer when cl_lw is off, it does create the sprite, but only shows it when it hits something it can damage. This is to reduce bandwidth usage.
See this if statement:

if ( g_pGameRules->IsMultiplayer() )

The Shotgun sound issue happens because sound playback is triggered in WeaponIdle, which isn't called while you hold don't the attack buttons.
I've fixed this, as well as playing pump sounds when you shoot the last shell, which was deliberately not being done before. See this commit: https://github.com/SamVanheer/HLEnhanced/commit/0cbbe099f3170170d41683c2a4288d1f06aad048

The tripmine issue happens because a line of code is commented out, see this line: https://github.com/ValveSoftware/halflife/blob/master/dlls/tripmine.cpp#L410

The RPG constantly playing the empty sound happens because it's reset all the time in WeaponIdle, which is called no matter what every frame.
I've fixed this, see this commit: https://github.com/SamVanheer/HLEnhanced/commit/c98747a35e324dca2d88c13036f1f74947caba96

The Python constantly restarting its reload animation might be caused by the client's ItemPostFrame not matching that of the server.
It constantly plays its empty sound because it's not using the code that every other weapon uses to play it, so the checks put into place for it don't get used.
I've fixed this, see this commit: https://github.com/SamVanheer/HLEnhanced/commit/274bd297f9af9cc251447dafc97de26019f0ed20

@SamVanheer
Copy link

The second issue with the Crowbar happens because the event for handling crowbar playback is played twice in close succession. I've fixed this issue in my codebase, here's the fix: https://github.com/SamVanheer/HLEnhanced/blob/3fe34139cebd6ded29ce690cae6026b661dfd0ca/game/shared/entities/weapons/CCrowbar.cpp#L128

Adding the if check here prevents the problem from occurring. This didn't happen in older versions of the game because events were added later.

@UCyborg
Copy link
Author

UCyborg commented Nov 20, 2016

Nice work! So players can just take your codebase and benefit from numerous bugfixes.

@SamVanheer
Copy link

Yup, that's the idea. There are also a bunch of new features added to it, i'm currently implementing VGUI2.

@SamVanheer
Copy link

@mikela-valve Some of these issues can be fixed.

@rtxa
Copy link

rtxa commented Apr 25, 2019

@SamVanheer check this issue with hornet gun
https://youtu.be/uKkJPFmDW9Q?t=269

@SamVanheer
Copy link

I was unable to reproduce that issue, but i do remember it happening before. Has it happened to you recently?

@Matthaiks
Copy link

https://youtu.be/uKkJPFmDW9Q?t=5m11s
It still "grinds" sometimes.

@mikela-valve mikela-valve assigned mikela-valve and unassigned ghost Apr 25, 2019
@mikela-valve mikela-valve added this to the Next Release milestone Apr 25, 2019
@mikela-valve
Copy link
Member

Fixed all but the crowbar hitting dead entities and the new hornet gun report. Will be included in next beta update.

@mikela-valve
Copy link
Member

mikela-valve commented May 21, 2019

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

@agrastiOs
Copy link

Indeed they're all fixed(except crowbar and hornet gun).

@oaus
Copy link

oaus commented May 21, 2019

Indeed they're all fixed(except crowbar and hornet gun).

#617 (comment)

@Matthaiks
Copy link

Indeed they're all fixed(except crowbar and hornet gun).

And the Gluon Gun?

@JulianHeuser
Copy link

JulianHeuser commented May 21, 2019

Gluon Gun doesn't appear to have been fixed in the newest beta. The energy cloud still only appears with cl_lw 0

Edit: The hornet gun seems to behave fine. Seeing as that video's from 2011, the bugs with it might have already been fixed.

@mikela-valve
Copy link
Member

@Sockman1 I intentionally skipped modifying the Gluon Gun based on @SamVanheer’s comments. I figure that if someone is deliberately running with cl_lwenabled that I should avoid adding anything that would affect performance in any way possible.

@BlackShadow
Copy link

@mikela-valve It seems cl_lw "1" causes double-reloading in several weapons. Like:

357
Glock
MP5
Crossbow

@mikela-valve
Copy link
Member

@BlackShadow306 I believe that was already reported in #2301.

@Matthaiks The gluon gun issue with cl_lw 1 in single player will take a bit more work to fix as it requires reworking the animation that runs when prediction is enabled. The reason it works with prediction disabled is that the client itself creates the effects rather than the server so they display properly. With prediction enabled it relies on the animation that plays to do all of the effects but the animation was only created with the beam effects and not the flare effect. If you'd kindly make another issue to track that specific work I'd like to close this one as fixed.

@mikela-valve
Copy link
Member

Closing as fixed.

@CS-PRO1
Copy link

CS-PRO1 commented Jun 6, 2019

@mikela-valve Crowbar hitting dead entities was fixed?

@mikela-valve
Copy link
Member

That one I left since it seems to be intentional logic in the crowbar code, I imagine to make it quicker to gib dead things. If that game logic does bother people enough I'd be willing to change it, but I concluded that it wasn't really a bug in the way that the other issues were so I decided to leave it for now.

@CS-PRO1
Copy link

CS-PRO1 commented Jun 6, 2019

Good, I asked since when I told some people about that there's a chance of that to be fixed they were a bit sad about it since it's become a part of the game's logic and nostalgia for some reason.. Thanks for reply!

@EvyHoustuvk
Copy link

I seem to remember a time when the crowbar behaved normally while gibbing dead bodies, and the rapid swinging bug was introduced in an update at some point. I could be mistaken, since it would have been several years ago when I remembered the crowbar not having this bug.

@di57inct
Copy link

di57inct commented Jul 9, 2019

Its always been there as far as I remember.

@UCyborg
Copy link
Author

UCyborg commented Jul 13, 2019

The crowbar rapid swinging bug exists since patch version 1.1.0.8. It works correctly in all previous versions.

Video showcasing that and some other differences

@agrastiOs
Copy link

@UCyborg Could it be an intended change by Valve because it seems to be intentional logic in the crowbar code? It isn't mentioned in the 1.1.0.8 patch notes, however... I opened a separate issue for this (#2590) just like a separate issue was opened for the Gluon Gun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests