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

SendProxy Manager


Post New Thread Reply   
 
Thread Tools Display Modes
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 11-17-2011 , 02:06   Re: SendProxy Manager
Reply With Quote #41

Quote:
Originally Posted by Afronanny View Post
I'll have to think about the best way to implement this, seeing as array members can consist of any of the other types. Additionally, what if you only wanted to proxy one of the array members?
Maybe you could allow the current hooks to handle array members directly (similar to the 'element' param in GetEntProp). As long as individually hooking the entire array wouldn't be a problem then that could work. The element could then be in the callback for ease of use.
__________________

Last edited by GoD-Tony; 11-17-2011 at 03:18.
GoD-Tony is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 11-18-2011 , 17:23   Re: SendProxy Manager
Reply With Quote #42

Quote:
Originally Posted by GoD-Tony View Post
Maybe you could allow the current hooks to handle array members directly (similar to the 'element' param in GetEntProp). As long as individually hooking the entire array wouldn't be a problem then that could work. The element could then be in the callback for ease of use.
What I'm trying is doing hooks by offset, as opposed to SendProp name. For instance:
PHP Code:
new offset FindSendPropInfo("CTFPlayer""m_bPlayerDominatingMe");
    
SendProxy_HookByOffset(clientoffset 4Prop_IntProxyCallback); 
The only problem with this is sometimes it cannot find the prop located at that offset.
ducks
Afronanny is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 12-10-2011 , 18:36   Re: SendProxy Manager
Reply With Quote #43

Updated (1.0.9):

Added support for hooking array props.

PHP Code:
native bool:SendProxy_HookArrayProp(entity, const String:name[], elementSendPropType:typeSendProxyCallback:callback); 



ducks
Afronanny is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 12-11-2011 , 03:43   Re: SendProxy Manager
Reply With Quote #44

Quote:
Originally Posted by Afronanny View Post
Updated (1.0.9):

Added support for hooking array props.
Thanks! Going to test this soon.

Code:
if (params[1] < 0 || params[1] > 2048)
{
	return pContext->ThrowNativeError("Invalid Edict Index %d", params[1]);
}
Should that be > 2047?
__________________

Last edited by GoD-Tony; 12-11-2011 at 03:45.
GoD-Tony is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 12-11-2011 , 16:43   Re: SendProxy Manager
Reply With Quote #45

Quote:
Originally Posted by GoD-Tony View Post
Should that be > 2047?
Perhaps.
ducks
Afronanny is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 12-12-2011 , 11:52   Re: SendProxy Manager
Reply With Quote #46

Quote:
Originally Posted by GoD-Tony View Post
Thanks! Going to test this soon.

Code:
if (params[1] < 0 || params[1] > 2048)
{
    return pContext->ThrowNativeError("Invalid Edict Index %d", params[1]);
}
Should that be > 2047?
or >= 2048
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 12-12-2011 , 14:18   Re: SendProxy Manager
Reply With Quote #47

So from what I understand this allows us to change the netprops of an entity without the server being aware of the changes. For example in your example the client's team is changed but to the server the client's team was not changed. Thus the client would if ff was off be able to kill (from the servers prospective) their own team but not the other while having the same model and appearing on the same team the server thinks they are on?

Is my understanding of how this works correct? Also is their any particular advantage to modifying the entities without the actual server being aware of the changes such as performance ect?

I run a server for war3 so I am looking for anything that may give me the ability to create cool abilities or ways to reduce load for existing ones.
__________________
zeroibis is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 12-12-2011 , 14:23   Re: SendProxy Manager
Reply With Quote #48

Quote:
Originally Posted by zeroibis View Post
So from what I understand this allows us to change the netprops of an entity without the server being aware of the changes. For example in your example the client's team is changed but to the server the client's team was not changed. Thus the client would if ff was off be able to kill (from the servers prospective) their own team but not the other while having the same model and appearing on the same team the server thinks they are on?

Is my understanding of how this works correct? Also is their any particular advantage to modifying the entities without the actual server being aware of the changes such as performance ect?

I run a server for war3 so I am looking for anything that may give me the ability to create cool abilities or ways to reduce load for existing ones.
That is correct. It only changes the value sent to all clients, not the value on the server.
ducks
Afronanny is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-12-2011 , 17:01   Re: SendProxy Manager
Reply With Quote #49

While I realize this is just for hooking the sending of props, is there any chance you can add the ability to hook prop changes to this? ie hook a change to m_iTeamNum.

Why? Just trying to not have it check every frame if something has changed then going from that. The amount of calls each hook goes through is a bit over the top.
KyleS is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 12-12-2011 , 21:28   Re: SendProxy Manager
Reply With Quote #50

Quote:
Originally Posted by KyleS View Post
While I realize this is just for hooking the sending of props, is there any chance you can add the ability to hook prop changes to this? ie hook a change to m_iTeamNum.

Why? Just trying to not have it check every frame if something has changed then going from that. The amount of calls each hook goes through is a bit over the top.
That can be done, yes. However, checking if it has changed every frame is the only way to detect if the value has been changed or not.
ducks
Afronanny 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 02:57.


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