Closed meag closed 3 years ago
https://github.com/ezQuake/ezquake-source/commit/08ec1888cdd345b93b955dea662fc8be01a7afa0 should improve, no feedback yet
[BLOOD_DOG(Discord)]:
Ok here's what I found after pulling the latest changes. My settings:
cl_weaponforgetondeath "1"
cl_weaponforgetorder "1"
cl_weaponhide "2"
cl_weaponhide_axe "0"
cl_weaponpreselect "4"
r_drawviewmodel "0.5"
Steps: Start a match, preselect RL with weapon 7 2, pickup an RL
1- On a server that does not support the serversideweapon extension, the drawviewmodel shows an SG (expected), and you fire an SG (expected)
2- On a server that does support the extension but you have it disabled client-side, same behavior (expected)
3- On a server that does support the extension and you have it enabled client-side, the drawviewmodel shows an RL when you pick up the RL (not expected, since you will fire an SG). Both the client and the server know that you're going to fire an SG (because of weaponforgetorder), right, so it should be possible to address this?
4- If you do the same thing but fire your SG before picking up the RL, the drawviewmodel doesn't switch to RL, it stays at SG (expected).
So, only scenario 3 is buggy, and it's slightly annoying because it's not always clear to me if I will fire an RL or an SG. Just to clarify that this is purely a visual issue (with drawviewmodel), the actual weapon selection seems fine.
Related commits
https://github.com/ezQuake/ezquake-source/commit/0b93267bd1d6ac81e8c84279a3d46b2002976261 https://github.com/ezQuake/ezquake-source/commit/c609595b8faee19dbfa49cde6fbe0e439e140654 https://github.com/ezQuake/ezquake-source/commit/8efac2fbf21ccbd48b13344d5a8fedc129cf24ee https://github.com/ezQuake/ezquake-source/commit/800b634daeae575699909047fcba8bdf4de2b8ab
https://github.com/ezQuake/ezquake-source/commit/b8567ba1764b42cad7ec48c2c91c3e81a348bc81 https://github.com/ezQuake/ezquake-source/commit/6968882785c6aa0ebadad5c3b51d52884cce8aa0 https://github.com/ezQuake/ezquake-source/commit/94bf1ff2a7a0365be53e29fb18a1ec070754e8a1 https://github.com/ezQuake/ezquake-source/commit/7bab25d42b56b95a814103bb77230390cb8041a9
[DP]BLooD_DoG:still 1 problem with latest changes
[DP]BLooD_DoG:in 4on4 / dmm1
[DP]BLooD_DoG:with serverside extensino enabled
[DP]BLooD_DoG:the drawviewmodel doesn't update to what you preselected, it only shows last fired weapon
[DP]BLooD_DoG:for example if you have RL and you fired some rockets, it draws an RL
[DP]BLooD_DoG:then if you press your SG selection bind (or any other), it still draws an RL
[DP]BLooD_DoG:when you +attack, an sg fires and the model updates to sg
[DP]BLooD_DoG:doesn't have with the extension disabled
[DP]BLooD_DoG:[actually it might be because i was playing on an older server, that might be the problem... central.usquake.world:28504]
so i've just experienced the problem a few times on a couple of servers over the past few days, both using my +fire binds along with cl_pext_serversideweapon, and a different problem when using my manual serverside weapon binds on the same servers. the first problem to do with cl_pext_serversideweapon was that if i switched from one weapon to another quickly enough or while still firing, it'd continue firing the old weapon. this happened a few times, though one of the times it happened it would only happen going from one to another (ie lg to rl) but not the other way around, so it does seem fairly sporadic. i was assuming this had something to do with my slightly complex aliases/binds (https://nicotinelounge.com/quake/config/weaps.cfg) but the intermittent behavior makes me think there may be more to it than just that. the second problem is saw when using my manual serverside weapon binds (https://nicotinelounge.com/quake/config/weaps2.cfg) on the same servers, was that if i held down the fire button it'd fire the thing once and then switch to my weaponhide weapon (with all except lg).
Hi ciscon
Was that on london.badplace.eu or local server? deurk's repo was behind because fixing sync with ezquake broke the automated build system - though I think this might be fixed now, older servers will definitely still be broken.
The last comment with blood_dog's final problems (https://github.com/ezQuake/ezquake-source/issues/408#issuecomment-739477504) I haven't had time to look at yet.
not local, these were other servers that just happened to be new enough to support the extension, so if these would be known problems a little while back it's very possible they were on those builds. i'll try testing on my ports with a decent ping and see if i can replicate any of it.
so i can replicate the problem firing lg and then switching to another weapon and it continues firing lg, i'm guessing it never -fire's the way i have in my alias while the button is still being held down plus the way the commands are being registered/triggered, going the other way works properly. using the old way of registering the serverside weapons i can't replicate it switching to the weaponhide weapon after the first fire, but if i set my ping high enough i can make it switch from rl to gl after the first shot as well as sg to gl after the first shot, though this doesn't happen with any of my other binds/aliases.
Can you try /cl_pext_debug_weaponscript 1
(or something similar, sorry haven't switched on home pc in days) and record a game against the bot on london.badplace.eu (think /sv_
equivalent is enabled there) then upload please?
switching between my lg and rl binds/aliases asdf.qwz.zip
fyi, i couldn't replicate my second problem (with the old way of doing the serverside weapons) on your port, though it seems consistent on mine with a high ping (running at current head of master on ktx/mvdsv)
Hi ciscon
Can you point out where in the demo the bug is?
Thanks
i'm constantly switching weapons in it, but at ~40 seconds you'll see i'm firing the rl, which i did, but immediate switched to lg and it continued firing rl
Thanks... can see it here, your initial command is being executed client-side then server-side (ws(s)
), then the switch to script is running client-side and never being executed server-side. I'll keep looking into it
Hi ciscon
Can you try again on internal server in latest (or london.badplace.eu) please?
Thanks, meag
[DP]BLooD_DoG:[actually it might be because i was playing on an older server, that might be the problem... central.usquake.world:28504]
^ Have you confirmed this on a newer server?
still doing it, i've also confirmed it's nothing to do with my fancy aliases, just using plain +fire binds.
The attached are working for me, I don't know what to do to make 'it' happen now (have it continue firing but not switch weapon?)
i'm sure it's somewhat ping related, though it's always reproducible for me with lg->other weapons if i switch too quickly/continue holding down +lg for any time after clicking that second +fire. i'd expect with my simple binds it'd act like it does with my aliases, or have the old +fire behavior or just stopping the firing.
it's always reproducible for me with lg->other weapons if i switch too quickly/continue holding down +lg for any time after clicking that second +fire
can you do setinfo dev 1
and see what it says in these instances?
does it definitely happen for you just switching using mouse1/mouse2?
i've run out of time on this now, will look again next weekend
it says it's switching but it doesn't
You're on an older server. There will be an underscore in setting new w_rank
on newer mvdsv.
that was on mine, let me upgrade it to the newest version for testing, i just did it real quick on that one but earlier i was on badplace
should i be using your fork of mvdsv/ktx? there aren't any updates in master i see
it's on mine - to get the code in sync with ezquake internal server I had to switch Q_free() to pcre_free() and it broke deurk's automated build scripts
the success was when i finally let go of my rl +fire
Is that just with +fire or with the lastattack
logic?
that was purely +fire binds with cl_weaponhide 1
I can't reproduce that with bind mouse1 +fire 7;bind mouse2 +fire 8
but do get weird behaviour if binding to aliases (bind mouse1 +rl;alias +rl +fire 7
) because the +fire/-fire is interpreted as being executed in the console, so all keys are cleared and the client-side anti-rollover isn't used.
The fact that it is trying to hide makes me think -fire has executed somewhere client-side?
this is what i was using there
bind MOUSE1 "+fire 7 5 2 3 4 1" bind space "+fire 8 3 5 2 4 1" bind MOUSE3 "+fire 2 1" bind MOUSE4 "+fire 6 2 1" bind MOUSE5 "+fire 5 4 2 1"
and switching between space/mouse1
Are you expecting:
1) hold down mouse1 (fires RL) 2) press space (fires LG) 3) release space (still fires LG, as mouse1 is held down)
to fire RL?
Other than that, I'm struggling to make anything odd happen.
i'm just looking for the first two things at this point, if i'm holding down lg, and then i also press rl, it just continues firing lg. i'd guess the fact that it spams out the fact that it's repeatedly trying and failing to set the weaponhide weapon, that's probably eating my second weapon choice.
Does that happen (normal binds, without any lastattack
checks) with server-side weapon switching turned off?
yes it works properly with it turned off, the lastattack stuff just makes it not stop firing when i release the first one.
That's what's confusing me - ezQuake already has built-in 2-button rollover check on +attack, so it shouldn't stop firing when you release the first one anyway. The following should work:
On every version of ezQuake, nothing to do with new extensions being on or off. No lastattack stuff required. Try it on 3.2 etc
the setting of w_rank in those aliases is what breaks that, if i were to use vanilla +fire binds it'd be fine- that's why i'm only testing those at this point, i'd expect things to get at least a little weird with aliases, but certainly plain old +fire stuff should be working as expected.
btw even with cl_weaponhide off, it still does the same thing- all i see in the console is the setting new w_rank until i release that second button, then i see "no longer firing"
okay, so apparently this behavior is because i had cl_weaponpreselect 1 set, if i turn that off it works fine- but this means it doesn't set w_rank when i fire a different weapon now :(
also from bd: [DP]BLooD_DoG: so i tested the serversideweapon stuff on london.badplace.eu and noticed 3 things: 1- weapon_forgetondeath isn't working for me. Pickup an RL, press weapon 7 2 bind, fire RL. So far so good. Die, pickup RL and press +attack, you expect to fire an SG because of forgetondeath but it fires an RL. 2- press weapon 7 2 bind, pickup RL, fire some rockets, run out of ammo. So far so good. +attack will fire an SG. Then walk over RL ammo and your +attack will fire RL again. Not sure if bug or undefined or if I can play with w_rank to address this. 3- Although I use the oldschool way of selecting a weapon with individual keys, and mouse1 to +attack whatever I selected, I do have one button that 'remembers' my current weapon choice, switches to LG and fires it (similar to +fire 8), and then when I let go it changes back to the previous weapon I was holding. That bind is also mostly working, however depending on when I let go of that key the viewmodel doesn't always change back to the previous weapon. Sometimes it still draws the LG model, even if the +attack will fire the previous weapon. I guess this depends on the timing of when I let go of the key.
Thanks - can reproduce with cl_weaponpreselect 1
, can you try london again please. weaponforgetondeath wasn't being applied if /cl_weaponforgetorder
was set.
Can you ask your boss what this secret blood_dog only weapon button bind is doing exactly?
that did it ;) i'll ask the boss about his junk
from the boss:
[DP]BLooD_DoG: it's the RALT bind for +lg
cl_weaponhide "2"
cl_weaponpreselect "4"
cl_weaponforgetondeath "1"
cl_weaponforgetorder "1"
r_viewpreselgun "1"
bind MOUSE1 "+att" // Press to manually fire currently selected weapon
bind RALT "+lg" // Press and hold to switch+fire lg/ng/sg, release to switch back to previous weapon for manual firing
set wp "2" // Default weapon is sg
set wasfiring "0" // Needed to support the +lg script so that we can keep firing after -lg if MOUSE1 is still held down
set wasfiringlg "0"
alias +att "weapon $wp; +attack; set wasfiring 1"
alias -att "-attack; firelgornot; set wasfiring 0"
bind 1 "weapon 1; set wp $weaponnum"
bind 2 "weapon 2 1; set wp $weaponnum"
bind 3 "weapon 3 2 1; set wp $weaponnum"
bind 4 "weapon 5 4 2 1; set wp $weaponnum"
bind 5 "weapon 5 4 6 2 1; set wp $weaponnum"
bind 6 "weapon 6 2 1; set wp $weaponnum"
bind 7 "weapon 7 2 1; set wp $weaponnum"
bind 8 "weapon 8 2 1; set wp $weaponnum"
bind / "weapon 8 7 6 5 2 3 1; set wp $weaponnum" // bestfire
bind MOUSE4 "weapon 3 2 1; set wp $weaponnum" //safefire
alias "+lg" "weapon 8 6 5 2; +attack; set wasfiringlg 1"
alias "-lg" "-attack; weapon $wp; fireornot; set wasfiringlg 0"
// This is so that if Mouse1 is held, and then Alt is held and let go while Mouse1 is still being held, Mouse1 continues to fire
alias fireornot "if ($wasfiring = 1) then +attack else -attack"
// this is for the opposite of the above
alias firelgornot "if ($wasfiringlg = 1) then +lg"
// Reset last weapon when respawning (avoid situation where you were firing rl, spawn, pickup a backpack with rl, fire rl by mistake.
// DOES NOT WORK WITH RULESET SMACKDOWN - no longer needed with cl_weaponforgetondeath
// alias f_death "set wp 2"
// alias f_respawn "set wp 2; weapon 2"
// END WEAPONSCRIPT
[1:33 AM] [DP]BLooD_DoG: also the forgetondeath still isn't working on london [1:32 AM] [DP]BLooD_DoG: for the ralt bind, i tested again and it's worth noting it's only bugging when i tap it quickly to fire 1 cell and let go [1:32 AM] [DP]BLooD_DoG: and it's purely a drawviewmodel problem, if i +att it fires RL (as exected), it's just showing that I'm holding an LG until I attack - then the viewmodel updates [1:33 AM] [DP]BLooD_DoG: but if i press it for a bit longer and let go, then the viewmodel updates correctly to the previous weapon
Has he tried moving set wp $weaponnum
to the start of +lg, rather than when selecting weapon?
How much does your new job pay? I hope Discord copy & pastes better on linux.
I tried moving set wp $weaponnum
to the start of +lg and still have the same issue. HOWEVER, I then tried on ciscon's server and it worked just fine. Then I thought it might be ping related, and bingo! If I delay packet up to 39ms (3 frame delay) it's fine, but as soon as it's about 40ms (4 frame delay) then it starts to fail. Anything higher than that and it always fails, but when i'm close to the limit it sometimes works and sometimes doesn't (due to ping deviation). When I say 'doesn't work', I mean the drawviewmodel stays stuck on the LG instead of going back to my previous weapon. The actual weapon it will fire next is correct, so it's purely a visual artifact with drawviewmodel (which is still a big deal to me).
(also, still having the issue with forgetondeath).
(also also, thanks ciscon for acting as the middle man while I set up another github personal account).
Is it fair to say that /cl_weaponforgetorder
is now working as before, and issue is solely with server-side weapon switching?
I think so - at least I haven't noticed any issues recently with it recently while serverside weapon is disabled. I can do some specific testing later if there's a particular concern.
Thanks BD - removing 'blocks-release' tag but leaving open
cl_weaponforgetorder.zip
Please search for existing issues and check for potential duplicates before filing yours.
ezQuake version: 3.6-alpha3 (?)
OS/device including version: Presumed all
Describe the bug something broke with cl_weaponforgetorder recently. Yesterday I said I think something is funky with some combination of the new cl_pext_serversideweapon and cl_weapon_forgetondeath, but I think it's just cl_weaponforgetorder that got screwed up. I was on 3.6-alpha(something) for a long time and didn't notice anything weird, but compiled the latest alpha a few days ago and enabled those new settings which is why I thought they were to blame. I disabled these 2 commands for this test and kept only cl_weaponforgetorder:
See https://www.twitch.tv/videos/782125932 for a quick example with at least 2 problems: 1- Run out of RL ammo, fire sg, pick up ammo, it switches back to firing RL. 99% sure this wasn't happening with older alpha. 2- On the twitch stream at about 35 seconds, you can see my viewmodel switches to RL even though it fires an SG. I had preselected weapon 7 on spawn and picked up an RL. This doesn't happen right after when I also preselect weapon 7 but fire an sg before picking up the rl. The demos (qwd and mvd) however don't show this viewmodel bug, they continue to show sg in both cases.
Screenshots