Walk Bugs (Private)
by Wilson [29th ID] · 2006-09-15 · 25 replies · 109 views · 7 downloads
From the first post
rn
rnBug 1.
rnWhen the round is starting, as you are waiting for it to say "Platoon, move out and stay low!" and players can begin moving, you can walk and let go and you can actually more before the round "starts." All I need is a test to see the roundstate and if it's "1" (which is pre-round), plugin_handled. If you know it cool otherwise I'll have to read up a bit.
rn
rnBug 2.
rnA little harder to fix. If you hold down sprint until you are out of stamina, then you let go and hold down walk, your stamina will rebuild as it normally does as you run out, overriding "walk speed." This returns you to full speed but you have no footsteps. We'd either have to do a velocity test in client_prethink or...well..can't really think of any other practical solution.
Added later in the thread
| dod_walk.sma | Plugin Source | 6 KB | 4 dl | Download Compile |
| dod_walk.sma | Plugin Source | 7 KB | 1 dl | Download Compile |
| dod_walk.sma | Plugin Source | 8 KB | 2 dl | Download Compile |
The thread
All 26 posts from 6 people on Walk Bugs (Private), kept as they were written.
Threads: 57
Joined: Oct 2005
I didn't want to make this public because they are exploits. Let me know if you guys know any solutions to these bugs.rnrnBug 1.rnWhen the round is starting, as you are waiting for it to say "Platoon, move out and stay low!" and players can begin moving, you can walk and let go and you can actually more before the round "starts." All I need is a test to see the roundstate and if it's "1" (which is pre-round), plugin_handled. If you know it cool otherwise I'll have to read up a bit.rnrnBug 2.rnA little harder to fix. If you hold down sprint until you are out of stamina, then you let go and hold down walk, your stamina will rebuild as it normally does as you run out, overriding "walk speed." This returns you to full speed but you have no footsteps. We'd either have to do a velocity test in client_prethink or...well..can't really think of any other practical solution.
Threads: 17
Joined: Jan 2005
I can help you out with bug 1...I had the same problem with the chicken mod. You can see it in there. The var I used is called FreezeTime.n nBasically I set it to true at plugin load...then when the round starts it makes it false...Here are a few snips:n n
nnew bool:FreezeTime = truen npublic round_start()n{nFreezeTime = falsen}n npublic round_end()n{nFreezeTime = truen}npublic game_start()n{nFreezeTime = truen}nnThat will catch the freezetime. This is what I used to block the command:n n npublic c_chicken(id, level, cid)n{nif(FreezeTime){nconsole_print(id, "Please wait till the round starts")nreturn PLUGIN_HANDLEDn}netc etcn}nnLet me know if you need me to explain more. You can also look at the chicken plugin to see all the code...It may make more sense that waynThreads: 103
Joined: May 2005
here try this out:nnthe changes i made are listed at the top of the sma file.. but anyway ill put them here with a bit more explanationnn- changed CVARS to PCVARS and fixed the lame way the float cvars were done [instead of float(get_cvar_num... i used (get_pcvar_float..]nnthe roundstate semi-fix lol.. works only after all flags have been captured.. like the very 1st round of the map.. you can still press walk and move around before it starts.. but after the 1st round starts.. it seems to prevent it after that..nnthe stamina fix.. basically i put in a prethink function that if the player is walking it sets the maxspeed.. and with this.. you could probably remove the "cur_weapon" function.. but you might need to change the "if" statement on the prethink function (like maybe add the other stuff from the cur_weapon if statement) because i didnt bother lmao..nnalso removed the engine module include as it wasnt needed for anything...nnand if you are gonna update the post in the plugins forums with some of these changes.. dont forget to increase the version number in the sma
Threads: 57
Joined: Oct 2005
Before we release that, my suggestion is to remove the "bind" part of it and make it use the +use key (IN_USE)rnrnI just haven't gotten around to coding it, but imagine how much easier it is to tell people "just press use" instead of "type this in your console, etc."rnrnPlus it's that way in Half-Life etc.rnrnAlso, for the "no footsteps on ladder" bug,rnrn
if (is_user_alive(id) && pev(id, pev_movetype) == MOVETYPE_FLY)rn // user is on ladderThreads: 17
Joined: Jan 2005
LOL...my way works for round states but whatever.
Threads: 103
Joined: May 2005
well i would leave the bind in as well.. for ppl that already have a key bound to itnnand with the ladder thing.. i think thats kinda realistic to have it be silent.. becuase if you walk up a ladder in real life slowly.. you can easily make it so you dont clang all around going up/down it..nnhell..nnis round_start round_end etc.. already in amxx? or do you have to have something register them?
Threads: 17
Joined: Jan 2005
They are already in amxx.
Threads: 103
Joined: May 2005
hmm really? and they work for dod?? lol thats odd..nnbecause that'd be a lot more effecient way to do it then all the RoundState crap
Threads: 103
Joined: May 2005
hell i noticed in your chicken plugin that you have:nn
register_event("TextMsg","round_start","bc"," 1=3","2=#game_roundstart_axis1")n register_event("TextMsg","round_start","bc"," 1=3","2=#game_roundstart_axis2") n register_event("RoundState", "round_end", "a", "1=3", "1=4", "1=5") nhow come you only have round_start for axis and not allies?nnn**i noticed that basically is the same thing as I posted, except i have it using just one register_event and one function (tho i did make a few mistakes i think that im gonna fix now..)nnis round_start round_end etc.. already in amxx? or do you have to have something register them?
They are already in amxx.nincorrect answer lol.. i meant are they already in it as functions sorta like client_putinserver etc etc... but you DO have to register the events for themnnn**EDIT**nni did a bit more work with this and fixed a few things that i did before..but one problem im running into is that im trying to allow walking with undeployed rockets.. but there doesnt seem to be a way to catch if the rocket is deployed or not.. dod_is_deployed seems to always return 0 even if you have the rocket shouldered.. any ideas?
Threads: 8
Joined: Sep 2004
...ni did a bit more work with this and fixed a few things that i did before..but one problem im running into is that im trying to allow walking with undeployed rockets.. but there doesnt seem to be a way to catch if the rocket is deployed or not.. dod_is_deployed seems to always return 0 even if you have the rocket shouldered.. any ideas?nnOut of curiosity, have you tried a check to see if a player is scoped?nSetFOV should be it. (0 = off, 20 = on)?
Threads: 57
Joined: Oct 2005
@diamond - nope there's no way to test if the rocket is deployed native-wise :(rnrn@pendragon - SetFOV check for scopes is already in the version I posted in developer's plugins. you cannot walk while scoped the bug has been fixed.
Threads: 17
Joined: Jan 2005
Crap...I completely forgot I did had to catch it...sorry about that :blush:n nAnyways, the only reason you have to catch axis is because you only need to catch the one team to turn the cvar off.n nI feel like a dolt now....sorry again =/
Threads: 103
Joined: May 2005
lol i put in a request or whatnot for it at amxx but as expected.. its like the only one without a reply after a day or so lmao
Threads: 57
Joined: Oct 2005
I think the easiest way to do this is in client_prethink. I do this in my ironsights plugin and the reason it does not create ridiculously high CPU usage is because you set a global variable with whether or not they are walking.rnrnThis way in client prethink the first thing it does is check if the client is walking. If not, do nothing at all.
Threads: 103
Joined: May 2005
ok wilson i think i got everything fixed (including the rockets..)nn
nchanges by diamond-optic (10-01-06)nn - added PCVARSn - roundstate fixn - stamina fixn - removed cur_weapon function as the stamina fix covered that as welln - remove engine module (not needed)n - fixed not being able to walk with undeployed rockets (added fakemeta)n - added public cvar (incase this is added to the stats tracker in the future)n
Threads: 57
Joined: Oct 2005
Great work diamond very determined of yah.rnrnDoes that compile for you? You took out engine but you're still using client_PreThink at the bottom. I'm sure you meant to hook FM_PreThink.
Threads: 103
Joined: May 2005
hmm i never hook the fm prethink and it always still works for me
Threads: 57
Joined: Oct 2005
Hmm...just weird - client_PreThink is part of the engine module. but you're not including the engine module in the plugin.
Threads: 103
Joined: May 2005
does it give you any compile errors?nnguess just adding the FM prethink stuff would be a good idea lol
Threads: 103
Joined: May 2005
heres a newer version:nn
- fixed holding walk and zooming inn - fixed not being able to walk after spawning sometimesn - added some connected/alive/bot checksn - register'd fakemeta PlayerPreThink forward
Threads: 103
Joined: May 2005
just wanna add after running the version i attached in the post above this one for about a week.. Im pretty confident that everything is fixed and working properly :)
Threads: 103
Joined: May 2005
ehehe i hate to really pester on this one..nnbut wilson you ever gonna update the thread?? or should i just do it :-P ?nnas i cant find any more problems with the last one i attached...nni think this is pretty much the changes ive done:n
changes by diamond-optic (10-01-06)n - added PCVARSn - roundstate fixn - stamina fixn - removed cur_weapon function as the stamina fix covered that as welln - remove engine module (not needed)n - fixed not being able to walk with undeployed rockets (added fakemeta)n - added public cvar (for tracking)nnchanges by diamond-optic (11-06-06)n - fixed holding walk and zooming inn - fixed not being able to walk after spawning sometimesn - added some connected/alive/bot checksn - register'd fakemeta PlayerPreThink forwardnnnand i really hate seeing a plugin avail. to the public with some nasty bugs while theres what seems to be a fixed version just sittin here in private...nnlol so im sorry.. its just something that really bothers me lol.. especially since i really like this plugin lol :-Pnn** again.. dont forget to update the version number in the sma as i dont think i touched that **Threads: 57
Joined: Oct 2005
Go ahead update it if you like. You've got the proper files and all. I just posted it I didn't make it originally.
Threads: 75
Joined: Jun 2006
I was thinking this plugin should allow the walk to be a bit faster....not the same speed as the scope/zooka, just about half way between running and zooming...just my 2 dirty cents...nnCheers!
Threads: 103
Joined: May 2005
on my server i set the speed to about 100 / 105 / 110 ishhh and it seems pretty good
Threads: 54
Joined: May 2005
on my server i set the speed to about 100 / 105 / 110 ishhh and it seems pretty goodn nI found 100 equals the same "speed" as if one was crouched... thats the setting I set for my server...

