Register for your free account! | Forgot your password?

You last visited: Today at 10:31

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

Advertisement



Jumping Problem

Discussion on Jumping Problem within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 09/11/2010, 22:53   #16


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
The client send a jump packet...

Data + TQClient

You process the jump packet...

Data + TQClient

You broadcast the jump packet...

Data + TQClient (+ TQServer)

Make sure that all out-going packets don't have two seals and have the right one. A good solution is to add TQServer before sending the data and to remove TQClient before processing the data.
CptSky is offline  
Old 09/12/2010, 00:05   #17
 
ImFlamedCOD's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 140
.Arco

The problem is not in the packet processing of jumping. The problem most likely lies in your packet itself. Check the packets to be sure there correct.
ImFlamedCOD is offline  
Old 09/12/2010, 10:04   #18
 
Ian*'s Avatar
 
elite*gold: 0
Join Date: Nov 2006
Posts: 805
Received Thanks: 464
Lets see your GetDistance function and your jump packet.
Ian* is offline  
Old 09/12/2010, 12:04   #19


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Put a breakpoint in at the beginning of the Jump handler and step through untill the client bombs out. Which method does it crash on? Let us know.
Korvacs is offline  
Thanks
1 User
Old 09/12/2010, 16:34   #20
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
See that's the thing though Jack, I can't find out where the client bombs cause it gets through the entire jump handler without any exception, it just dcs at the end.

@Ian
Code:
        public static short GetDistance(ushort X, ushort Y, ushort X2, ushort Y2)
        {
            return (short)Math.Max(Math.Abs(X - X2), Math.Abs(Y - Y2));
        }
Arcо is offline  
Thanks
1 User
Old 09/12/2010, 16:38   #21


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
In that case, are you modifying the TQString at the end of the packets? That appears to be the only cause in that case.
Korvacs is offline  
Old 09/12/2010, 16:40   #22
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Well if I wasn't sending the TQString, then wouldn't ALL mypackets be invalid? o.O
Arcо is offline  
Thanks
1 User
Old 09/12/2010, 16:44   #23


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Quote:
Originally Posted by .Arco View Post
Well if I wasn't sending the TQString, then wouldn't ALL mypackets be invalid? o.O
Yes, however the packets your sending this time are existing ones that require modifying not new ones.

I havent seen your send method so i cant know can i
Korvacs is offline  
Old 09/12/2010, 16:54   #24
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
My method for sending packets?
Well here you go.
Code:
        public void Send(IClassPacket Packet)
        {
            lock (this)
            {
                this.Socket.Send(Packet.Serialize());
            }
        }

        public void Send(byte[] Packet)
        {
            lock (this)
            {
                this.Socket.Send(Packet);
            }
        }
    }

    public interface IClassPacket
    {
        void Deserialize(byte[] Bytes);
        byte[] Serialize();
    }
Arcо is offline  
Thanks
1 User
Old 09/12/2010, 16:56   #25


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Whats your Serialize() Method for the General Data packet?

Edit:

In fact whats this method aswell SendScreen()
Korvacs is offline  
Old 09/12/2010, 17:01   #26
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by Korvacs View Post
Whats your Serialize() Method for the General Data packet?

Edit:

In fact whats this method aswell SendScreen()
I'll just give you my entire gendata packet.
Code:
        public void SendScreen(IClassPacket CMsg, bool SendSelf)
        {
            SendScreen(CMsg.Serialize(), SendSelf);
        }
Arcо is offline  
Thanks
1 User
Old 09/12/2010, 17:05   #27


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Yeah, so you never modify the TQstring at the end of the packet, so the client sends the packet with TQClient, and you send it back without changing it to TQServer, so the client receives an invalid packet and disconnects.

Atleast thats what it looks like from here, unless its somewhere in this.RealPacket.
Korvacs is offline  
Old 09/12/2010, 17:07   #28
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Ah thanks Jack, I've never really messed with the TQSeal before, soexactly how do I implement that into the packet?
Arcо is offline  
Thanks
1 User
Old 09/12/2010, 17:10   #29


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
You write an additional 8 bytes onto the end of the packet without modifying the length, any packet sent from the server requires TQServer, other than that you dont need to worry about it since its not a proxy.

Code:
public static byte[] TQServer = Encoding.ASCII.GetBytes("TQServer");
Dump that somewhere and memcpy onto the end of the packet everytime you send.
Korvacs is offline  
Old 09/12/2010, 17:21   #30
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
So something like this.
Code:
        public unsafe void Send(byte[] Packet)
        {
            lock (this)
            {
                fixed (byte* p = Packet)
                    for (int i = 0; i < 8; i++)
                        *(p + i + Packet.Length - 8) = (byte)PacketBuilder.TQServer;
                
                this.Socket.Send(Packet);
            }
        }
Arcо is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Problem] Jumping and Walking being Viewed
08/04/2010 - CO2 Private Server - 2 Replies
Hey! I fixed Character Spawning... but there's a problem with walking and jumping. It does it right for the character running or walking; but when the walking action is being viewed, the viewed character is just standing there... but he's supposed to be walking and is walking. Same with jump. They appear in the screen - not even in a half jump... and then they jump out to the top right no matter where you jump. public static byte Walk(int Direction, int UID) { ...
anyone has this problem? ms jumping very fast
11/05/2008 - Dekaron - 5 Replies
ok i was wondering if anyone has this problem. everything was working fine at the start. but after a few hours i started to have this problem. whenever i went into the game, the ms would keep increasing from 200 to 20000 and ill just dc. its impossible for me to trainn like this. even when i restart my computer and stuff, its still occuring. My internet connection has no problem so it should not be the cause. Does anyone else face this problem too, and can anyone teach me how to fix this? help...
Jumping problem
01/19/2006 - Conquer Online 2 - 7 Replies
I get a jumping problem after reinstalling conquer last night. I used to jump my two legs togheter, but now, I jump like if i was walking in the air, the two legs moving and I also see other players jumping like that.Can anyone help me?(I also feel that im jumping slower this way)Thank you in advance for anyone who could help!
Jumping problem
12/08/2005 - Conquer Online 2 - 0 Replies
OK, here is what happened, after CO2 came out, too many errors and glitches happened, so I decided to redownload and reinstall the whole game all over again, after reinstalling, everything is fine, but once i logged into my tro, i realize it jumps totally different than it used to be. I have a small male tro. Before, it jumps with its leg close together, you guys should know what i mean. But now, it jumps like a small male tao, or a female tao, it jumps with its legs moving back and forth. The...



All times are GMT +2. The time now is 10:31.


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.