using sendprop/sendtables

General discussion for off-topic subjects.
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

using sendprop/sendtables

Postby D3CEPTION » Mon Apr 25, 2016 8:38 am

ive asked about how to use sendtables before in the forum and now stumbled upon this function:

Code: Select all

.def("playback_temp_entity",
         &IVEngineServer::PlaybackTempEntity,
         "Queue a temp entity for transmission",
         args("filter", "delay", "sender", "st", "class_id")
      )

one of the args seems to be a sendtable, but i still have no idea how to usethem.i know that functions pass these around in the network modules, but if anybody knows how to create one, i would appreciate to hear it, as im trying to test the function.

here my current approach guesses:

Code: Select all

playback_temp_entity(class IVEngineServer {lvalue}, class IRecipientFilter {lvalue} filter, float delay, void const * sender, class SendTable const * st, int class_id)

"filter" = RecipientFilter()
"delay" = 0
"class_id" = TempEntity('xy').server_class.class_index

"sender" = PlayerEntity(0).pointer # pointer to world?
"st" = ?? # class SendTable const * st // its a string??

also looked into tempentity class, but can only find "template", which looks like something else, a simple property storage..
if anybody can help how to create the sendtable arg, id appreciate to know, would like to test this function.
User avatar
Ayuto
Project Leader
Posts: 1541
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: using sendprop/sendtables

Postby Ayuto » Mon Apr 25, 2016 10:34 am

D3CEPTION wrote:"st" = ?? # class SendTable const * st // its a string??

I have never used that method before, but this one is clearly saying that it requires a SendTable object. :p
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

Re: using sendprop/sendtables

Postby D3CEPTION » Mon Apr 25, 2016 10:41 am

i know :D if you look into my post edits, you can see i changed around a lot, as i got confused a few times myself ;)
do you know at all, if the server has any ability to create one via python? maybe through memory module (copying existing object)?
User avatar
Ayuto
Project Leader
Posts: 1541
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: using sendprop/sendtables

Postby Ayuto » Mon Apr 25, 2016 4:59 pm

We haven't exposed the SendTable constructors. So, yes... you either need to copy an existing one and modify it or recreate it using memory.alloc() and the methods of the Pointer class (or you use the TypeManager).

But I'm really wondering what you are trying to do?!
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

Re: using sendprop/sendtables

Postby D3CEPTION » Tue Apr 26, 2016 6:38 am

basically i would mess around with the sendtables, see how the engine reacts with different entries, skipping certain functioncalls, find new possibilies. but i guess ill find the same answers, the boring way, by searching around in the sdk github

Return to “Whatever”

Who is online

Users browsing this forum: No registered users and 1 guest