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

[CS:GO] Yet another SDKHook glitch - SetTransmit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-04-2016 , 17:31   [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #1

Hi again,
It's funny, but it seems that only I use sdk hooks
There is a heavy bug with SetTransmit.
PHP Code:
public Action onSetTransmit(int entityint client
{
    return 
Plugin_Handled;

Try that and you will see magic. Or try to do checks(if) and return handled.
So let the magic begin: you will have view as a spectator, sometimes no, sometimes you will be teleporting while walking and if there is player near that has set transmit too. Or you can stuck in spawn point for few seconds. And the best one I liked, game client crash without errors.
So the logics/idea is that if somehow entity(you) equals client(you), you will get bad day. Some people can mess with this. It can ignore your check logics written in callback, unless you know how it works really.

Fix. Add this at the beginning of setTransmit callback:
PHP Code:
if (entity == client) return Plugin_Continue
__________________

Last edited by xbatista; 03-04-2016 at 17:43.
xbatista is offline
Send a message via Skype™ to xbatista
Miu
Veteran Member
Join Date: Nov 2013
Old 03-04-2016 , 18:06   Re: [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #2

Seems like intended behavior
Miu is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 03-04-2016 , 21:44   Re: [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #3

Why would you block the transmit of a client to himself? Doesn't sound like a bug, but a logical fallacy.

Last edited by thecount; 03-04-2016 at 21:45.
thecount is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-05-2016 , 02:23   Re: [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #4

I don't block themselves. As I wrote above, it can happen with simple check:

PHP Code:
if ( GetClientTeam(entity) != GetClientTeam(client) && !isGhost[entity]
    && 
GetClientTeam(client) == CS_TEAM_T && isGhost[client] && shouldCollide[client] && shouldCollide[entity] )
        return 
Plugin_Handled
Here good luck with that. It is still entity == client.

If you don't believe you can do several checks/tests.

So logically I need to add additional check: GetClientTeam(entity) == CS_TEAM_CT, if I want to prevent glitch. That logics in SetTransmit really strangly works. So Fix I wrote above remove all problems.
__________________

Last edited by xbatista; 03-05-2016 at 03:16.
xbatista is offline
Send a message via Skype™ to xbatista
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 03-07-2016 , 05:24   Re: [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #5

That's like sending quit in servercommand and wondering why your server is ded
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-07-2016 , 06:14   Re: [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #6

Quote:
That's like sending quit in servercommand and wondering why your server is ded
Atleast it prints why is ded...

I'm wondering why this check not inside sdkhooks. Because it's not needed outside. Thats why I was thinking how do my server lags.
I've seen some plugins using SetTransmit without checking if it is not the same player by entity.
So they are like slow motion bomb. Some day it will blow up server without knowing what happened.
And good luck then testing 2000 thousands of code lines which provoked server yelling.
__________________

Last edited by xbatista; 03-07-2016 at 06:19.
xbatista is offline
Send a message via Skype™ to xbatista
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-07-2016 , 11:19   Re: [CS:GO] Yet another SDKHook glitch - SetTransmit
Reply With Quote #7

Quote:
Originally Posted by xbatista View Post
Atleast it prints why is ded...

I'm wondering why this check not inside sdkhooks. Because it's not needed outside. Thats why I was thinking how do my server lags.
I've seen some plugins using SetTransmit without checking if it is not the same player by entity.
So they are like slow motion bomb. Some day it will blow up server without knowing what happened.
And good luck then testing 2000 thousands of code lines which provoked server yelling.
Because the hook just hooks the function, there is some checks but they are to protect from crashes mostly, you are responsible for the logic.
Dr!fter 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 13:24.


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