Page 1 of 1

using sendprop/sendtables

Posted: Mon Apr 25, 2016 8:38 am
by D3CEPTION
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.

Re: using sendprop/sendtables

Posted: Mon Apr 25, 2016 10:34 am
by Ayuto
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

Re: using sendprop/sendtables

Posted: Mon Apr 25, 2016 10:41 am
by D3CEPTION
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)?

Re: using sendprop/sendtables

Posted: Mon Apr 25, 2016 4:59 pm
by Ayuto
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?!

Re: using sendprop/sendtables

Posted: Tue Apr 26, 2016 6:38 am
by D3CEPTION
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