Raised This Month: $51 Target: $400
 12% 

Ham_Touch spam issue


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-07-2017 , 10:26   Re: Ham_Touch spam issue
Reply With Quote #11

He said to leave the time as a float, not round.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-07-2017 , 10:29   Re: Ham_Touch spam issue
Reply With Quote #12

yes, i know i don't understand this part:
Quote:
Rounded time in your code gives not 10 secs, but from 9.5 to 10.5 secs.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-07-2017 , 11:08   Re: Ham_Touch spam issue
Reply With Quote #13

Quote:
Originally Posted by HamletEagle View Post
@Bugsy:
1 touch 2
1 stop touching 2
1 touch 2 again
I know...and?

I'm not sure what his goal is, its just something I thought I'd throw out there.
__________________
Bugsy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-07-2017 , 11:10   Re: Ham_Touch spam issue
Reply With Quote #14

And your code will fail.
__________________
HamletEagle is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-07-2017 , 11:26   Re: Ham_Touch spam issue
Reply With Quote #15

Quote:
Originally Posted by HamletEagle View Post
And your code will fail.
Fail? It does what I said it would..which covers what you pointed out. I understand it will not detect a re-touch of the same player. What do you mean?
__________________

Last edited by Bugsy; 01-07-2017 at 11:27.
Bugsy is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-07-2017 , 11:31   Re: Ham_Touch spam issue
Reply With Quote #16

That's the fail. The re-touch needs to work.

@Craxor: rounding the time will make the time shorter or longer, depending on which method you're using, so leave it as it is (float) if you want to get exactly 10 seconds.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-07-2017 , 11:34   Re: Ham_Touch spam issue
Reply With Quote #17

Quote:
Originally Posted by OciXCrom View Post
That's the fail. The re-touch needs to work.

@Craxor: rounding the time will make the time shorter or longer, depending on which method you're using, so leave it as it is (float) if you want to get exactly 10 seconds.
I wouldn't necessarily call it a fail because I intentionally coded it that way and explained in my post how it will function. I do not know what the OP's end result expectation is so I made an assumption. It's not what the OP needs.

@Craxor/OP : If you want to use get_gametime() then make all of the associated variables/values a float since that is what get_gametime() returns. It appears you are using floatround() just to convert it to an integer, not to do an intentional rounding on the value. If you do not want to use floats, use get_systime() instead since this returns an integer.
__________________

Last edited by Bugsy; 01-07-2017 at 11:43.
Bugsy is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 01-07-2017 , 13:31   Re: Ham_Touch spam issue
Reply With Quote #18

Quote:
Originally Posted by Bugsy View Post
Instead of putting a timer on the touch, you can track the last player that was touched and not register a touch again until a different player is touched.

1 touches 2 [touch fires]
1 touches 2 [nothing happens]
1 touches 2 [nothing happens]
1 touches 4 [touch fires]
1 touches 4 [nothing happens]
1 touches 2 [touch fires]
he would be back to the original problem of intense spam if three players form a "circle" of touch
jimaway is offline
heroicpower7613
Member
Join Date: Nov 2016
Old 01-08-2017 , 10:05   Re: Ham_Touch spam issue
Reply With Quote #19

Quote:
Originally Posted by Bugsy View Post
Instead of putting a timer on the touch, you can track the last player that was touched and not register a touch again until a different player is touched.
thanks for reply the code works.

Quote:
Originally Posted by jimaway View Post
he would be back to the original problem of intense spam if three players form a "circle" of touch
i don't think it would crash the server or anything

Last edited by heroicpower7613; 01-08-2017 at 10:07.
heroicpower7613 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-08-2017 , 10:12   Re: Ham_Touch spam issue
Reply With Quote #20

Quote:
Originally Posted by heroicpower7613 View Post
thanks for reply the code works.
Just so you are aware, this will not register a touch if the same player is re-touched. So if you touch a player and then walk away and go back and touch the same player, no touch will happen. And you can possibly see a spam situation if you are touching multiple players at the same time.
__________________
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode