| 
		
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
		
		
		05 Sep 10, 03:50PM 
(This post was last modified: 08 Sep 10, 05:07PM by Luc@s.)
		
	 
		Hey all 
you may have noticed it was sometimes hard to kick laggers, or boring to check ping yourself etc. 
That's why I think, a lagger auto-kick could be nice on some servers.
 
I tried to make one for my ladder, that's what I did : 
1) you have to turn on a switch (-l) to enable the auto kick. 
you have to specify the ping limit between "normal" player and "laggy" players with this switch; for example, if you want a limit of 700 of ping, you will have to add this to the cmd line : 
 -l700 
(Note that the min value is 500)
 
2) The server check all players ping. When a ping is too high (compared to the limit) the player is in a lag period. If his ping doesn't go under the limit during the next x milliseconds, the player is auto kicked. 
x is calculated from a formula (for my tests, I used : 
x = (1.33/ping) * 5500 * 1000) 
Lag period is reset only  if the ping does under the limit during more than 1 second (this value can be changed).
 
This is what I actually did (I'm not cpp developper at all, sorry my code must be bad, but it should work, and you will see what I mean) :
 
serverevents.h
http://paste.debian.net/87957/ 
protos.h
http://paste.debian.net/87958/ 
My question : could something like this be implemented ? 
Do you agree on the system ? Do you have better values or formulas to suggest ? Would you like something like that to exist ?
 
(Ask me if you didn't understand something) 
Thanks, hope it will help
	
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
		Yes I would want that. And do the same for PJ because PJ matters more :D
	 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		Sure, I could add pj verif. in is_lagging_autokick().It would to include everything in client struct/class too.
 ;)
 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		O.o That's great! Especially since I thought it was already in the code...Why did I think that...
 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		I added a server side accuracy + fixed struct. 
To see players accuracy, do  
 /serverextension playersacc 
You can ping the server too 
(just saying !ping) 
the servers answers "pong" with your ping. 
Useful to see if you are still connected to a server when it lags.
 
server.cpp
http://pastebin.ca/1934915 
serverevents.h
http://pastebin.ca/1934914 
protos.h
http://pastebin.ca/1934916 
I hope you like the idea, maybe some things like that could be one day implemented... just a try
	
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
		
		
		07 Sep 10, 03:30PM 
(This post was last modified: 07 Sep 10, 03:30PM by Luc@s.)
		
	 
		I changed behavior of the accuracy part (now it's taking in account distance for nades and sprays for shotgun). 
You can see here what it gives :
 ![[Image: feb2887915f583cb49918e3ff3e88e53ee8ac5cb.jpeg]](http://hfr-rehost.net/http://self/pic/feb2887915f583cb49918e3ff3e88e53ee8ac5cb.jpeg)  
I would like to know statement of some devs, if you think it's shitty say it is, but react please :D
	
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		I dont know how you figured this, but I dont really think grenades should be counted in there. :P I dont know why, they just dont seem right to add in.
	 
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		Maybe an extension name that doesn't look like "player sac".Great ideas, though.
 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
		
		
		08 Sep 10, 01:02PM 
(This post was last modified: 08 Sep 10, 01:03PM by Luc@s.)
		
	 
		 (07 Sep 10, 10:52PM)Ronald_Reagan Wrote:  I dont know how you figured this, but I dont really think grenades should be counted in there. :P I dont know why, they just dont seem right to add in. 
why not ? :) if you spam, your accuracy is lower 1st. But if you throw good nades, you're accuracy is better, I think it's fair :) 
ty for support :D
	 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
		
		
		08 Sep 10, 05:13PM 
(This post was last modified: 08 Sep 10, 06:07PM by Luc@s.)
		
	 
		New update including : 
- shuffle by tag system : 
 /serverextension shuffle "tag1 tag2" 
and all players with tag1 will be in the same team, and the players with tag2 in their name will be in the enemy team... 
You can use the number of tags you want... with a total limit of 50 chars. In most of the cases, you'll use a max of 2 I think :D 
- private message system : 
 /serverextension msg "cn the message" 
will send "the message" to player of client number "cn" 
for example :  
 /serverextension msg "5 defend please" 
- demo download limit (3 max downloads by demo) (I have to improve this system) 
- fixed accuracy system 
-I didn't update playersacc command name, because I didn't know what to use instead of it, sorry V-MAN :p 
I recall you I do it to give ideas for 1.1.0.3 (or next version) and to prove it's possible to do :D
 
server.cpp
http://pastebin.ca/1935808 
serverevents.h
http://pastebin.ca/1935810 
protos.h
http://pastebin.ca/1935809 
 
oh and join iafmatch.com:28700 if you want to test 
admin password is "test" 
it's on AC 1.1.0.3
	
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		XDplayeracc?
 Or you could go the opposite way and rename it player_sack.
 Or /serverextension teabag [cn]
 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		 (08 Sep 10, 06:11PM)DES|V-Man Wrote:  XDplayeracc?
 Or you could go the opposite way and rename it player_sack.
 Or /serverextension teabag [cn]
 OK I will :) 
Wanna come on the server to test ? ;)
	 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		Oh, what about brief ping spikes? How about if a ping remains in the constant high zone then they get kicked? Not just for an instant of high ping.
	 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		well, you can do that, just use a lower value for ping limit.If you want players having 550 of average ping to be kicked (and if their ping is over this most of the time)
 just use -l550 or less :) It will do what you want :)
 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		So its an average ping then? I missed that part. :P
	 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		no, it's a lag period limit; if your lag period is too long, you get kicked.if you have a stable ping of 550, and if the server ping limit is 500, you'll get kicked :)
 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		Ok. That sits well with me then :) I really want to help you try these out!
	 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		ok then compile AC SVN :DI'm doing it on SVN so I don't have to change everything after next release if I have to update :)
 
		
	 
	
	
	
		
	Posts: 108Threads: 3
 Joined: Jun 2010
 
	
	
		but how to do this without loosing anticheat? thats what these mods do right?a dev can add?
 
		
	 
	
	
	
		
	Posts: 297Threads: 5
 Joined: Jun 2010
 
	
	
		 The devs had a slight problem with the cheat detection kicking non cheats for hacking because of lag spikes or some junk so,I would love to hear a devs point of view on this modified server and if it falls under the good or bad category.
 
		
	 
	
	
	
		
	Posts: 534Threads: 21
 Joined: Jun 2010
 
	
	
		Although I am not a dev, the anti-cheat lag problem was not because of clients lagging.  As Brahma had previously stated, the anti-cheat takes lagging clients into effect.  However, the problem with the anti-cheat is that it does not yet take server side lag into effect: if the server lags, pretty much everyone on the server could be kicked.
 I think this is a very nice idea, Luc@s.
 
		
	 
	
	
	
		
	Posts: 591Threads: 19
 Joined: Jun 2010
 
	
	
		the struct laggyclient should not exist, lagging is property of client and such property should cause disconnect, there should be something easer to discover lagger, if c->ping include lagging server, you must fix c-> ping computation
	 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		@ everybody : thanks :)
 @ Alien : I don't have access to client struct/class so I have to use another one, I know it would be better to integrate it to "client" but I couldn't;
 Then, if you had read the last source, I'm using a struct named "cclient" -> custom client for everything.
 And I can't just use ping property for lag, I need to know when the client started to lag or stopped to lag ;)
 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		Modifying a server is one thing.Modifying the client means you can't play publicly.
 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		Yes, I only modify server, and it's not 24/7, I just run it for tests.It's not made to be used, just to give ideas of what could be implemented, and how it could work. :)
 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		I am making a new game mode for AC, I'll post it later.If you want to test it with me, please ask here :)
 
 The mode => TKTB (:D) keep the base
 
		
	 
	
	
	
		
	Posts: 108Threads: 3
 Joined: Jun 2010
 
	
	
		luc@s let me know when/where on IRC
	 
		
	 |