[Anet]removing client entities

Posted By: darkinferno

[Anet]removing client entities - 09/23/09 13:09

basically i have a few items, they remove perfectly on the server but still remain visible on the client and i wanted to know the best/easiest way to remove them.. too bad there's no enet_ent_remove ^^

the method i tried was to set a skill to 1 then send that skill back to the client which would in turn remove itself.. but i keep getting crashes so i'm not sure..
Posted By: Dark_samurai

Re: [Anet]removing client entities - 09/23/09 13:24

of course there is enet_ent_remove() wink
Posted By: darkinferno

Re: [Anet]removing client entities - 09/23/09 13:46

L M A O.. now do i feel special... lol, and you know how many times i read through the manual -blushes and hides in shame-

-lol-

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?
Posted By: darkinferno

Re: [Anet]removing client entities - 09/23/09 14:58

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....

Posted By: Dark_samurai

Re: [Anet]removing client entities - 09/23/09 17:28

Quote:
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!

Quote:
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?
Posted By: darkinferno

Re: [Anet]removing client entities - 09/23/09 22:51

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
Posted By: Dark_samurai

Re: [Anet]removing client entities - 09/24/09 16:00

Place an error("Test!"); above the if function. I'm pretty sure that the function isn't called.
Posted By: croman

Re: [Anet]removing client entities - 09/24/09 16:08

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?
Posted By: Dark_samurai

Re: [Anet]removing client entities - 09/24/09 16:20

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).
Posted By: croman

Re: [Anet]removing client entities - 09/24/09 16:24

yea, but still... :)) anyway, can you post bigger part of that code where the error occurs?
Posted By: Hand_Of_Law

Re: [Anet]removing client entities - 09/25/09 09:10

I had the same problem where a global entity does not get created unless there first is a client connected entity. As in my case it was not a real problem I use a workaround.
Posted By: darkinferno

Re: [Anet]removing client entities - 09/25/09 09:40

ok umm, so the function doesnt call but how is that, arent all actions assigned in wed called automatically and if so, why does it call when a client joins
© 2024 lite-C Forums