Home   Help Search Login Register  

Author Topic: I can see dead people  (Read 1256 times)

0 Members and 1 Guest are viewing this topic.

hermano

  • Guest
I can see dead people
« on: 11 Jul 2005, 14:33:26 »
I ran into an interesting problem.
Situation: There are airtransports to transport the players. The transport and pilots will spawn whenever transport is requested. Those units are created on the server. They will be deleted when the transport is completed and the transport returned to base (on the server again).
If units local to the clients use the transports the pilots are not deleted (the helicopter is deleted) on that client. Those units do not exist on the server anymore but can be seen on the clients.
Their name points to 'scalar bool...etc.' (that's objNull, right?) on the clients. Thus they cannot be deleted on the clients.

I will try if those units can be deleted if variables are assigned to point at the pilot and gunner of the heli on the client before it is deleted - and use these variables to delete the units on the clients.
Edit: that doesn't work

Any ideas?
« Last Edit: 11 Jul 2005, 15:09:41 by hermano »

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:I can see dead people
« Reply #1 on: 11 Jul 2005, 16:41:29 »
Just an idea (flashbacks from the past but can't be sure):

Kick those pilots out of the chopper and unAssignVehicle them from it before using the deleteVehicle command on them. And additionally, make sure the pilots do not belong to any group before trying to get rid of them.

I am not sure if the "kicking out and unassigning" part should be done only on the server or on clients too. Maybe you can tell us how it works. Test it first only from the server.

Use delays between commands to ensure everyone keeps up to the changes.

That might help.

Deleting them on the clients would be a wrong solution for this, imho.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re:I can see dead people
« Reply #2 on: 11 Jul 2005, 16:43:55 »
On server only first delete the crew i.e. driver and gunner, then delete the vehicle.  If you delete the vehicle first it might cause problems.

Remember, if the vehicle is named, for example, transport1 then the driver, gunner and commander are automatically named transport1D,transport1G and transport1C. Then deleteVehicle transport1D, deleteVehicle transport1G and deleteVehicle transport1C.

You could also delete them using deleteVehicle (driver transport1), deleteVehicle (gunner transport1) and deleteVehicle (commander transport1).
« Last Edit: 11 Jul 2005, 16:49:54 by Mr.Peanut »
urp!

hermano

  • Guest
Re:I can see dead people
« Reply #3 on: 11 Jul 2005, 17:07:16 »
Deleting the vehicle first did the trick. Thanks for fast answers!
h
« Last Edit: 11 Jul 2005, 17:16:42 by hermano »