View Single Post
  #48  
Old 01-08-2004, 06:04 AM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default Re: response

Quote:
Originally Posted by Wumpas

Code:
Wp#||delta_x||delta_y||delta_z||delta_heading||Heading

1|3.40723|-0.543457|0.00167656|-515|70
1|3.40723|-0.543701|0.00167656|0|70
2|61.2969|-9.77979|0.0301838|0
2|61.2969|-9.77979|0.0301838|0|70
2|3.3916|-0.633789|-0.000461578|1|71
2|3.3916|-0.633789|-0.000461578|0|71
WP 2 is a dockpoint and the ship exibits a "strange heading in game at this waypoint"
See what happens at wp 2? Looks like a major leap... and a heading of 0 too. Did you set the boat to make a major turn at that point or is this something the server did in error?

Unless I misunderstood something in the code, the delt values are how much to change the valuse. In other words how much to move the NPC from the current position for X/Y/Z and how much to turn (and what direction) in the delta heading.

At the wp, the server sends a different packet. This one contains the actual position thet the NPC should be at. The real X/Y/Z and heading, not delta values. This allows the client to synch with the server so they agree where the NPC is, in case a packet has been lost or rounding on either side has caused a variance.

It is the second type of packet I have become suspicious of.
__________________
Maybe I should try making one of these servers...
Reply With Quote