|
Re: ENet Library
[Re: AceX]
#444418
08/09/14 17:36
08/09/14 17:36
|
Joined: Jun 2001
Posts: 1,004 Dossenbach
nfs42
Serious User
|
Serious User
Joined: Jun 2001
Posts: 1,004
Dossenbach
|
Andreas GSTools - Home of GSTScript 0.9.8: lua scripting for A6/7/8 GSTNet 0.7.9.20: network plugin for A6/7/8 GSTsqlite 1.3.7: sql database plugin for A6/7/8 3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
|
|
|
Re: ENet Library
[Re: Ch40zzC0d3r]
#444448
08/11/14 10:43
08/11/14 10:43
|
Joined: Jul 2014
Posts: 49 Romania,vaslui
AceX
OP
Newbie
|
OP
Newbie
Joined: Jul 2014
Posts: 49
Romania,vaslui
|
This is the code that I have:
...
DLLFUNC void AddEntity(ENTITY* ent,char* mdl)
{
ent = ent_create(mdl,vector(0,0,0),NULL);
}
I need to do something to send relevant information.
|
|
|
Re: ENet Library
[Re: AceX]
#444484
08/12/14 13:43
08/12/14 13:43
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Putting aside for a second that you need to define your own protocol and that Enet just takes care of pushing packages around:
Your AddEntity() method does not what you think it does, the pointer will not be transferred out of the function. You assign it a new value, but that's not visible to the caller. Either go with pointer to pointer, or better, return it as a return value.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
|