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

Netprops


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-14-2015 , 17:41   Netprops
Reply With Quote #1

Ciao guys,

is it somehow possible to set different entity netprop for different players?

From players point of view:
Player A: netprop = 1.0
Player B: netprop = 1.0
Player C: netprop = 10.0

example in action:
  1. have a prop_dynamic
  2. set render color netprop
    1. for Ts: red color
    2. for CTs: blue color

Last edited by KissLick; 08-15-2015 at 15:53.
KissLick is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-14-2015 , 17:59   Re: Netprops
Reply With Quote #2

I was looking for a way to solve this problem for a very long time. It seems the only way is to hook SendPacket, find the property in the netbuffer and replace it accordingly to the client address in the NetChannel

Last edited by kadet.89; 08-14-2015 at 17:59.
kadet.89 is offline
Send a message via Skype™ to kadet.89
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-15-2015 , 08:40   Re: Netprops
Reply With Quote #3

Oh my... I am lost here... Did you actually manage to do that?
KissLick is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-15-2015 , 08:54   Re: Netprops
Reply With Quote #4

The way the delta compression and packing works makes it almost impossible without massively crippling server performance.
__________________
asherkin is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-15-2015 , 09:51   Re: Netprops
Reply With Quote #5

And is it somehow possible to send my own SendPacket?
Not hooking and changing it, just create new one and send it.
KissLick is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-15-2015 , 13:00   Re: Netprops
Reply With Quote #6

Yes, it's possible. But if you want to make buffers for every player, then the server will have to compress the data for each player separately what will lead to lags

Last edited by kadet.89; 08-15-2015 at 13:05.
kadet.89 is offline
Send a message via Skype™ to kadet.89
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 08-15-2015 , 14:10   Re: Netprops
Reply With Quote #7

There's an extension for SM called SendProxy, it does just this.
KyleS is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-15-2015 , 15:30   Re: Netprops
Reply With Quote #8

Quote:
Originally Posted by KyleS View Post
There's an extension for SM called SendProxy, it does just this.
As far as I know, SendProxy Manager can change netprops without changing them on server (just send them to players), but only for all players.
And I need to change netrop just for some players.
KissLick is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-15-2015 , 15:34   Re: Netprops
Reply With Quote #9

There is a function:
NET_SendPacket(INetChannel *,int,netadr_s const&,uchar const*,int,bf_write *,bool) 00163AA0
The only problem is to decompress the data in the buffer - bf_write. Or, may be the data is still not compressed here?

Last edited by kadet.89; 08-15-2015 at 15:38.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Miu
Veteran Member
Join Date: Nov 2013
Old 08-15-2015 , 18:15   Re: Netprops
Reply With Quote #10

Quote:
Originally Posted by kadet.89 View Post
I was looking for a way to solve this problem for a very long time. It seems the only way is to hook SendPacket, find the property in the netbuffer and replace it accordingly to the client address in the NetChannel
Why would that be the only way? Surely it assembles the packet at a prior point
Miu 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 12:19.


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