MCServer Development Discussion
#59
(11-08-2011, 04:51 AM)Sebi Wrote: I've been looking into mobs' code.
Code:
cMonster::SpawnOn( cClientHandle* a_Target )
Is this function supposed to run when a player sees a mob? (it does)
Yes

(11-08-2011, 04:51 AM)Sebi Wrote: It has
Code:
Chunk->Broadcast( Spawn );
shouldn't it be
Code:
a_Target->Send( Spawn );

and also, when a mob is spawned (in cWorld.cpp) SpawnOn is called with NULL, why is it called there anyways?

Giving NULL as the parameter will spawn the entity on all clients within range ( there's an if a_Target == 0 check )

You are right that it's strange that the entity spawn is broadcasted AND sent to all clients. If this is what happens the packets are sent multiple times to the same client. Sounds like an error
Reply
Thanks given by:


Messages In This Thread
MCServer Development Discussion - by rs2k - 10-21-2011, 11:24 AM
RE: MCServer Development Discussion - by rs2k - 10-24-2011, 09:34 AM
RE: MCServer Development Discussion - by rs2k - 10-24-2011, 09:50 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 05:28 AM
RE: MCServer Development Discussion - by rs2k - 11-06-2011, 05:38 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 06:45 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 08:12 AM
RE: MCServer Development Discussion - by rs2k - 11-06-2011, 08:18 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 12:34 PM
RE: MCServer Development Discussion - by rs2k - 11-06-2011, 07:27 PM
RE: MCServer Development Discussion - by Sebi - 11-07-2011, 11:32 PM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 03:27 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 04:51 AM
RE: MCServer Development Discussion - by FakeTruth - 11-08-2011, 05:14 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 05:17 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 05:29 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 05:55 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 06:03 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 06:09 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 06:40 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 08:09 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 09:03 AM
RE: MCServer Development Discussion - by Sebi - 11-10-2011, 06:12 AM
RE: MCServer Development Discussion - by rs2k - 11-10-2011, 10:07 AM
RE: MCServer Development Discussion - by Sebi - 11-10-2011, 10:55 PM
RE: MCServer Development Discussion - by rs2k - 11-11-2011, 02:33 AM
RE: MCServer Development Discussion - by rs2k - 11-11-2011, 10:23 AM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 02:31 AM
RE: MCServer Development Discussion - by tbar - 02-05-2012, 04:08 AM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 04:39 PM
RE: MCServer Development Discussion - by rs2k - 02-05-2012, 05:41 PM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 09:19 PM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 11:21 PM
RE: MCServer Development Discussion - by tbar - 02-06-2012, 04:21 AM
RE: MCServer Development Discussion - by xoft - 02-06-2012, 01:42 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 08:04 PM
RE: MCServer is open source! - by rs2k - 10-21-2011, 08:23 PM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 09:00 PM
RE: MCServer is open source! - by rs2k - 10-21-2011, 10:23 PM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 10:29 PM
RE: MCServer is open source! - by FakeTruth - 10-21-2011, 11:51 PM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 11:55 PM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 12:18 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-22-2011, 12:56 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 01:51 AM
RE: MCServer is open source! - by rs2k - 10-22-2011, 04:21 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-22-2011, 06:21 AM
RE: MCServer is open source! - by vcnnews - 10-22-2011, 07:04 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 07:27 AM
RE: MCServer is open source! - by rs2k - 10-22-2011, 08:15 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 08:24 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-22-2011, 09:04 AM
RE: MCServer is open source! - by rs2k - 10-22-2011, 09:20 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 10:20 AM
RE: MCServer is open source! - by rs2k - 10-23-2011, 01:05 AM
RE: MCServer is open source! - by FakeTruth - 10-23-2011, 05:09 AM
RE: MCServer is open source! - by rs2k - 10-23-2011, 05:18 AM
RE: MCServer is open source! - by necavi - 10-23-2011, 03:27 PM
RE: MCServer is open source! - by rs2k - 10-24-2011, 02:20 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 03:59 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 05:04 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 06:51 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 06:55 AM
RE: MCServer is open source! - by necavi - 10-24-2011, 07:02 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 07:05 AM
RE: MCServer is open source! - by necavi - 10-24-2011, 07:08 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 07:40 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 08:03 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 08:11 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 08:29 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 08:30 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 08:55 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 09:04 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 09:20 AM



Users browsing this thread: 1 Guest(s)