Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 02:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



which packet tells client entity has left range?

Discussion on which packet tells client entity has left range? within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
which packet tells client entity has left range?

I raised this question because i cannot figure out which packet actually informs the client that a particular entity has left the char's detectable range.

I looked up korvac's doc, it's slightly outdated. The first few fields are most packets are still valid, but the latter fields are not quite accurate now.

Anyway, i realized that the remove entity packet type of general data is sent to client when an entity is completely removed from game; Eg, a mob is killed, a client dc'ed.

If a char jumped out of detectable range, something might be sent to client, but i cannot spot it.
shitboi is offline  
Old 01/21/2011, 04:19   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
There is nothing sent to the client. The client will auto remove it from display after a certain range (18). The server can also then send a remove entity packet (general data subtype 156 if I remember). That only occurs though in situations such as a mob dies while on screen (not killed by you) and has finally degenerated from the map (takes a significant amount of time).

So yah... if you're trying to maintain a structure of local entities, you need to be auto removing from it whenever they pass range 18 from your current position (so update it every time you move).
pro4never is offline  
Old 01/21/2011, 04:24   #3
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
no wonder i dont see a relevant packet.

so, does that mean, i need to keep track of the current distance they are from me as well as the direction of their final detectable jump? If they jump in a direction that will make them exceed a distance of 18, i remove them?


Oops... that was a completely stupid question, the destination coordinates in the jump packet is more than enough, lol.
shitboi is offline  
Old 01/21/2011, 05:31   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by shitboi View Post
no wonder i dont see a relevant packet.

so, does that mean, i need to keep track of the current distance they are from me as well as the direction of their final detectable jump? If they jump in a direction that will make them exceed a distance of 18, i remove them?


Oops... that was a completely stupid question, the destination coordinates in the jump packet is more than enough, lol.
Yah all you need to do is whenever they, or you move you do a quick distance check to see if it's over 18 and if so you remove.


NOTE: distance in conquer is NOT the way many people write it (like on pservers). It's a tile system... so you literally just need to do something like...


if(Math.Abs(ToX - FromX) > 17)
return false;
else if(Math.Abs(ToY - FromY) > 17)
return false;
return true;

Most people are using distance of a line type formulas... which is all well and good for MANY things but when it comes to max distance of actions and stuff, you're limited by tiles, not lines.
pro4never is offline  
Thanks
1 User
Old 01/21/2011, 05:41   #5
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
yeah, that is what i did., haha. it's cool. I gotta sleep now. yet to implement the actual remove(entity), but it will be a breeze. thanks for responding.
shitboi is offline  
Old 01/21/2011, 05:44   #6
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by pro4never View Post
That only occurs though in situations such as a mob dies while on screen (not killed by you) and has finally degenerated from the map (takes a significant amount of time).
It's also supposed to be sent when someone teleports out of your screen without jumping or moving, such as a scroll or going to market.
nTL3fTy is offline  
Old 01/21/2011, 06:12   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by nTL3fTy View Post
It's also supposed to be sent when someone teleports out of your screen without jumping or moving, such as a scroll or going to market.
Ooh of course. You should definitely be removing the uid of the packet from your locals... I was more referring to monsters for hunting. That's the only 'remove' packet that tq uses afaik but it doesn't so much have to do with going offscreen, it's related to being removed from the map.
pro4never is offline  
Old 01/22/2011, 06:12   #8
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
I didn't want to start a new thread again, so i'll dump further packet related questions here.
How is the timer being set and incremented on proxy?
shitboi is offline  
Old 01/22/2011, 07:13   #9
 
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
Quote:
Originally Posted by shitboi View Post
I didn't want to start a new thread again, so i'll dump further packet related questions here.
How is the timer being set and incremented on proxy?
Environment.TickCount?
Santa is offline  
Old 01/22/2011, 17:10   #10
 
gabrola's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 1,039
Received Thanks: 1,335
And check walk packets too.
gabrola is offline  
Reply


Similar Threads Similar Threads
[5180] Entity Spawn Packet Structures
12/29/2010 - CO2 Private Server - 4 Replies
Anybody has Packet structures of Entity Spawn (5180 Version)? Thanks. *Can I Get Them* ?
Confused about the spawn entity packet
12/20/2010 - CO2 Private Server - 7 Replies
So I wanted to update the spawn entity packet from Hybrid's source (5135 -> 5165) public unsafe struct SpawnEntityPacket { public ushort Size; public ushort Type; public uint Model;



All times are GMT +2. The time now is 02:23.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.