|
Re: [Anet]removing client entities
[Re: darkinferno]
#291136
09/23/09 14:58
09/23/09 14:58
|
Joined: May 2009
Posts: 1,816 at my pc (duh)
darkinferno
OP
Serious User
|
OP
Serious User
Joined: May 2009
Posts: 1,816
at my pc (duh)
|
i also found a slight problem, what i did was have an entity placed on the map create the item via enet_ent_create, what this results in however, is two entities being created on the client.. how do i create it only if its the server, i tried:
if (enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE) enet_ent_create(_str("pistol.mdl"),my.x,_str("pickup"));
dint work at all....
Last edited by darkinferno; 09/23/09 15:05.
|
|
|
Re: [Anet]removing client entities
[Re: darkinferno]
#291174
09/23/09 17:28
09/23/09 17:28
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
also... since this topic is pretty much pointless, i wanted to know how you handles team license, if i have two developers on my team and one is making minor changes to code, does he have to have the full version also, i guess so? If he also makes use of ANet he needs to buy a team licency or a full licency. The team licency can't be used for publishing a game but costs only 1/4 of a full version. Please notice that if you buy a team licency, the team leader must own a full version! i also found a slight problem, what i did was have an entity placed on the map create the item via enet_ent_create, what this results in however, is two entities being created on the client.. how do i create it only if its the server, i tried:
if (enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE) enet_ent_create(_str("pistol.mdl"),my.x,_str("pickup")); This should work. What is the problem with this code?
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet]removing client entities
[Re: Dark_samurai]
#291221
09/23/09 22:51
09/23/09 22:51
|
Joined: May 2009
Posts: 1,816 at my pc (duh)
darkinferno
OP
Serious User
|
OP
Serious User
Joined: May 2009
Posts: 1,816
at my pc (duh)
|
it does work, the problem is... the entity doesnt get created on the server until a client joins, which makes no sense to me...
this is all thats in the function:
function pistol_pickup() { set(my,PASSABLE); if(enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE) enet_ent_create(_str("pistol.mdl"),my.x,_str("pickup")); }
but strangely, it doesnt create anything on the server, but if i remove: if (enet_get_connection() == SERVER_MODE || enet_get_connection() == CLIENT_SERVER_MODE) from the above code then everytime a client joins, the entity gets created.. so am not entirely sure whats happening
|
|
|
Re: [Anet]removing client entities
[Re: darkinferno]
#291332
09/24/09 16:00
09/24/09 16:00
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Place an error("Test!"); above the if function. I'm pretty sure that the function isn't called.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet]removing client entities
[Re: Dark_samurai]
#291337
09/24/09 16:08
09/24/09 16:08
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
does he needs to sync something maybe? cause when the other client joins it syncs all the stuff so the pistol gets visible too. maybe that's the problem?
Ubi bene, ibi Patria.
|
|
|
Re: [Anet]removing client entities
[Re: croman]
#291339
09/24/09 16:20
09/24/09 16:20
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
The server doesn't need to synchronize anything. Synchronizing (enet_ent_synchronize()) does nothing more than creating all the global entities that exist on the server on the clients. You should test if enet_ent_create() is called after the client connected or if the entity only gets visible then (you can use the debug panel, ent row, to look if an entity was created and the error() function or the debugger to check if enet_ent_create() was called).
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet]removing client entities
[Re: darkinferno]
#291343
09/24/09 16:24
09/24/09 16:24
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
yea, but still... :)) anyway, can you post bigger part of that code where the error occurs?
Ubi bene, ibi Patria.
|
|
|
|