I've done more work since my last post and I have the basics working-- my custom sendproxy function sends inventory changes to the right client. The main question I was trying to ask was what happens if I change which client that data should get sent to.
If the sendtables only send changes that happen to a networked array and not the entire array every update, then if I change the recipient client, will that new client get the entire array or just the updates that the first client would have gotten? If only updates are sent, is there a way I can force sending the entire array to the new client? At this point I'm not too far from just finding out by experiment, but if anybody knows what I might run into I'd appreciate the info. On Sun, Feb 16, 2014 at 4:14 AM, Jorge Rodriguez <bs.v...@gmail.com> wrote: > If I'm understanding you correctly, you have a chest of many items that > has a single owner. > > There should be no problem with the chest changing ownership during its > lifetime. I'm not sure why it's not working for you, perhaps you can post > your data structures and supporting code in a pastebin? > > I've implemented not an inventory system but a loadout system, this was my > data structure: > > > https://github.com/BSVino/DoubleAction/blob/master/mp/src/game/server/sdk/sdk_player.h#L468 > > Maybe you can use that code as a starting point. > > > 2014-02-14 1:18 GMT-05:00 Victor V <vicp...@gmail.com>: > >> Hi all, >> >> I'm trying to put together an inventory system and need some help >> clarifying how datatables work. >> >> Each inventory is an entity that keeps EHANDLEs to the entity that it >> "belongs to" and to the player that is accessing it. In this case, I would >> only want the inventory data to be sent to the player actively using the >> chest, so the player handle would change from null, to one player, back to >> null, and to the next player, etc. >> >> It doesn't seem like sendtables are designed to support changing >> recipients during the entity's life. When do updates get sent? Is there a >> way I can force send an update at any time? I'm sending an array of >> integers. Does SendPropArray3 only send the members that have changed (will >> different players get incomplete updates)? Is there a more obvious solution >> to what I'm trying to achieve? >> >> Thanks >> Victor >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders >> >> >> > > > -- > Jorge "Vino" RodrÃguez > [ Tw <http://twitter.com/vinobs> | Fb <http://www.facebook.com/bsvino> | > G+ <http://www.google.com/profiles/bs.vino> | Ht<http://vinoisnotouzo.com>] > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders > > >
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders