Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 972 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
client disconnected but entities remain #287544
09/01/09 11:08
09/01/09 11:08

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



(3DGS-networking)

Hi!

When I connect a client to a server and create an entity this entity remains if I "kill" the client by pressing the window-close-button (upper right x).

This happens also if I ent_remove the entity on_exit.
The EVENT_LEAVE ist triggert on the server.

How can I eliminate clients entites if the client was killed?

Re: client disconnected but entities remain [Re: ] #287549
09/01/09 11:25
09/01/09 11:25
Joined: May 2008
Posts: 33
Russia/Netherlands
H
Hand_Of_Law Offline
Newbie
Hand_Of_Law  Offline
Newbie
H

Joined: May 2008
Posts: 33
Russia/Netherlands
Do you wait for some time ?
For me it takes 5-10 seconds for entities to be removed when connection is lost.

Re: client disconnected but entities remain [Re: Hand_Of_Law] #287574
09/01/09 12:56
09/01/09 12:56

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



Yes I waited but the entity still remains...

PS: I start the server with session_open....

Last edited by mercuryus; 09/01/09 12:59.
Re: client disconnected but entities remain [Re: ] #287927
09/03/09 09:42
09/03/09 09:42
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
use the EVENT_DISCONNECT on the entitys:
Code:
if (event_type == EVENT_DISCONNECT)
{
  wait (1);
  ent_remove(me);
}



the entities created by the clients are not automatically removed when they disconnect, you have to program that using the code above.
EDIT: of course, that event has to run on the server, not on the client that is killed.

Last edited by SchokoKeks; 09/03/09 09:43.

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1