Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

Walk Bugs (Private)

by Wilson [29th ID] · 2006-09-15 · 25 replies · 109 views · 7 downloads

Read the thread (26 posts)

From the first post

I didn't want to make this public because they are exploits. Let me know if you guys know any solutions to these bugs.
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.

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
09-15-2006, 03:56 AM #1

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.

H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
09-17-2006, 07:01 PM #2

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}n
nThat 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}n
nLet 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 wayn

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
09-20-2006, 08:35 PM #3

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

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
09-21-2006, 01:01 AM #4

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 ladder
H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
09-21-2006, 11:14 AM #5

LOL...my way works for round states but whatever.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
09-21-2006, 07:42 PM #6

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?

H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
09-22-2006, 12:41 AM #7

They are already in amxx.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
09-22-2006, 09:35 PM #8

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

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
09-28-2006, 06:25 PM #9

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..)nn
is 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?

PenDragon
posted here
Posts: 58
Threads: 8
Joined: Sep 2004
09-30-2006, 02:02 AM #10
...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)?

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
09-30-2006, 02:56 AM #11

@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.

H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
09-30-2006, 09:02 PM #12

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 =/

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
09-30-2006, 11:50 PM #13

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

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
10-01-2006, 02:01 AM #14

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.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
10-01-2006, 07:58 PM #15

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
Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
10-01-2006, 09:13 PM #16

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.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
10-01-2006, 09:17 PM #17

hmm i never hook the fm prethink and it always still works for me

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
10-02-2006, 05:43 PM #18

Hmm...just weird - client_PreThink is part of the engine module. but you're not including the engine module in the plugin.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
10-02-2006, 06:29 PM #19

does it give you any compile errors?nnguess just adding the FM prethink stuff would be a good idea lol

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
11-14-2006, 09:29 PM #20

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
diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
11-20-2006, 03:40 PM #21

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 :)

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
01-07-2007, 09:42 PM #22

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 forwardn
nnand 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 **

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
01-08-2007, 05:20 AM #23

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.

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
01-08-2007, 12:21 PM #24

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!

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
01-08-2007, 12:27 PM #25

on my server i set the speed to about 100 / 105 / 110 ishhh and it seems pretty good

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
01-08-2007, 03:58 PM #26
on my server i set the speed to about 100 / 105 / 110 ishhh and it seems pretty good
n nI found 100 equals the same "speed" as if one was crouched... thats the setting I set for my server...

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC