Core/Transport: some improvements #5330

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
@wilds
Contributor

wilds commented Feb 20, 2012

  • fix script hook
  • fix BuildStartMovePacket and BuildStopMovePacket cause desync client-server
  • generate waypoint using spline
@QAston

This comment has been minimized.

Show comment
Hide comment
@QAston

QAston Feb 20, 2012

Contributor

Looks good, but I'd like to some people to test this to make sure it works as intended before merging this PR. Thanks.

Contributor

QAston commented Feb 20, 2012

Looks good, but I'd like to some people to test this to make sure it works as intended before merging this PR. Thanks.

@Amit86

This comment has been minimized.

Show comment
Hide comment
@Amit86

Amit86 Feb 20, 2012

Contributor

what are the ingame effects of this fix?

Contributor

Amit86 commented Feb 20, 2012

what are the ingame effects of this fix?

@wilds

This comment has been minimized.

Show comment
Hide comment
@wilds

wilds Feb 20, 2012

Contributor

@Amit86

  • Transport client-server position is a little more accurate and synchronized;
  • Arrival and departure events can be used with more precision;
  • hooked scripts are called correctly;
  • if you need to start/stop the transport, BuildStartMovePacket and BuildStopMovePacket works correctly now
  • source code more clean and clearly
Contributor

wilds commented Feb 20, 2012

@Amit86

  • Transport client-server position is a little more accurate and synchronized;
  • Arrival and departure events can be used with more precision;
  • hooked scripts are called correctly;
  • if you need to start/stop the transport, BuildStartMovePacket and BuildStopMovePacket works correctly now
  • source code more clean and clearly
@Subv

View changes

src/server/game/Entities/Transport/Transport.cpp
return true;
}
-struct keyFrame
+struct CommonInitializer

This comment has been minimized.

@Subv

Subv Feb 20, 2012

Contributor

Isnt this already defined somewhere else in the spline code?

@Subv

Subv Feb 20, 2012

Contributor

Isnt this already defined somewhere else in the spline code?

@Subv

This comment has been minimized.

Show comment
Hide comment
@Subv

Subv Feb 21, 2012

Contributor

:)

Contributor

Subv commented Feb 21, 2012

:)

@eilo

This comment has been minimized.

Show comment
Hide comment
@eilo

eilo Feb 21, 2012

Contributor

This is what i really need, i was unable to improve some of this behavior packets, besides, implement another functions to complement another functions aswell, very good, ill test it.

Contributor

eilo commented Feb 21, 2012

This is what i really need, i was unable to improve some of this behavior packets, besides, implement another functions to complement another functions aswell, very good, ill test it.

@Aokromes

This comment has been minimized.

Show comment
Hide comment
@Aokromes

Aokromes Feb 21, 2012

Member

This can fix the issue where some transports are seen at some random places outside route?

Member

Aokromes commented Feb 21, 2012

This can fix the issue where some transports are seen at some random places outside route?

@Ka0z

This comment has been minimized.

Show comment
Hide comment
@Ka0z

Ka0z Feb 21, 2012

Contributor

I believe that this fix the problem related to npc position in the transport desync? (client-server), or am i wrong?. Thx.

Contributor

Ka0z commented Feb 21, 2012

I believe that this fix the problem related to npc position in the transport desync? (client-server), or am i wrong?. Thx.

@Star-lion

This comment has been minimized.

Show comment
Hide comment
@Star-lion

Star-lion Feb 21, 2012

Contributor

so will this fix the thing with the ship in the tunnel? :D

Contributor

Star-lion commented Feb 21, 2012

so will this fix the thing with the ship in the tunnel? :D

@Subv

This comment has been minimized.

Show comment
Hide comment
@Subv

Subv Feb 21, 2012

Contributor

@kandera lol, that ship....LOL

Contributor

Subv commented Feb 21, 2012

@kandera lol, that ship....LOL

@wilds

This comment has been minimized.

Show comment
Hide comment
@wilds

wilds Feb 21, 2012

Contributor

@Aokromes Yes, it can
@Ka0z You are right
@kandera "thing with the ship in the tunnel"?

Contributor

wilds commented Feb 21, 2012

@Aokromes Yes, it can
@Ka0z You are right
@kandera "thing with the ship in the tunnel"?

@Aokromes

This comment has been minimized.

Show comment
Hide comment
@Aokromes

Aokromes Feb 21, 2012

Member

wilds kandera means the same i mean :)

Member

Aokromes commented Feb 21, 2012

wilds kandera means the same i mean :)

@Star-lion

This comment has been minimized.

Show comment
Hide comment
@Star-lion

Star-lion Feb 21, 2012

Contributor

but i love getting ss from people who qq about not being able to ride teh tram

Contributor

Star-lion commented Feb 21, 2012

but i love getting ss from people who qq about not being able to ride teh tram

@Subv

This comment has been minimized.

Show comment
Hide comment
@Subv

Subv Feb 22, 2012

Contributor

Has anyone tested it?

Contributor

Subv commented Feb 22, 2012

Has anyone tested it?

@FilipLukac

This comment has been minimized.

Show comment
Hide comment
@FilipLukac

FilipLukac Feb 22, 2012

Ill gime a day maybe two

Ill gime a day maybe two

@Subv

This comment has been minimized.

Show comment
Hide comment
@Subv

Subv Feb 26, 2012

Contributor

so...

Contributor

Subv commented Feb 26, 2012

so...

@wilds

View changes

src/server/game/Entities/Transport/Transport.cpp
- }
- d = d - keyFrames[i].distSinceStop;
+ bool teleport_on_this_node = (point_Idx == spline.last() - 1 ? teleport : false); //if is the last node of segment -> teleport
+ teleport_on_this_node |= (point_Idx == path.size() -1 ? !never_teleport : false); //if is the last node of path, teleport if teleported at least one time

This comment has been minimized.

@wilds

wilds Feb 26, 2012

Contributor

teleport_on_this_node |= (node_Idx == path.size() -1 ? !never_teleport : false);

@wilds

wilds Feb 26, 2012

Contributor

teleport_on_this_node |= (node_Idx == path.size() -1 ? !never_teleport : false);

Core/Transport: some improvements
 * fix script hook
 * fix BuildStartMovePacket and BuildStopMovePacket cause desync client-server
 * generate waypoint using spline
@wilds

This comment has been minimized.

Show comment
Hide comment
@wilds

wilds Feb 26, 2012

Contributor

I tested it myself, there are synchronization issues that range from 0 to 15s in some paths, but other paths are correct.

Contributor

wilds commented Feb 26, 2012

I tested it myself, there are synchronization issues that range from 0 to 15s in some paths, but other paths are correct.

@Aokromes

This comment has been minimized.

Show comment
Hide comment
@Aokromes

Aokromes Feb 27, 2012

Member

On what paths?

Member

Aokromes commented Feb 27, 2012

On what paths?

@Warpten

This comment has been minimized.

Show comment
Hide comment
@Warpten

Warpten Feb 27, 2012

Member

about the ships in tunnel bug, sometimes you will some transports gobs spawned as transports in tunnels-like places, they wont be moving. leaving the area then re-entering it would fix the issue.

I'D suggest to take a look at Shauren's fork of trinitycore. http://github.com/Shauren/TrinityCore There's lots of good stuff, but his changes cause high uptime lag (tested with only one player) and some transports seem not to have any gravity force field.

Member

Warpten commented Feb 27, 2012

about the ships in tunnel bug, sometimes you will some transports gobs spawned as transports in tunnels-like places, they wont be moving. leaving the area then re-entering it would fix the issue.

I'D suggest to take a look at Shauren's fork of trinitycore. http://github.com/Shauren/TrinityCore There's lots of good stuff, but his changes cause high uptime lag (tested with only one player) and some transports seem not to have any gravity force field.

@wilds

This comment has been minimized.

Show comment
Hide comment
@wilds

wilds Mar 10, 2012

Contributor

@Aokromes path fom storm to borean tundra has 15sec of desync. But gunship sync is ok ;)

Contributor

wilds commented Mar 10, 2012

@Aokromes path fom storm to borean tundra has 15sec of desync. But gunship sync is ok ;)

@Expecto

This comment has been minimized.

Show comment
Hide comment
@Expecto

Expecto Mar 11, 2012

enum{ REPLACE TO

enum
{

Expecto commented Mar 11, 2012

enum{ REPLACE TO

enum
{

@click

This comment has been minimized.

Show comment
Hide comment
@click

click Apr 1, 2012

Member

@wilds - did you figure out the reason for the desync?

Member

click commented Apr 1, 2012

@wilds - did you figure out the reason for the desync?

@wilds

This comment has been minimized.

Show comment
Hide comment
@wilds

wilds Apr 6, 2012

Contributor

sorry, my job takes me too much time and I have no free time to develop. I think that the solution for desync issue is related to acceleration, the first node is almost synch, in the second the desynch increases, and so on

Contributor

wilds commented Apr 6, 2012

sorry, my job takes me too much time and I have no free time to develop. I think that the solution for desync issue is related to acceleration, the first node is almost synch, in the second the desynch increases, and so on

+ if (path[node_Idx].actionFlag == 2)
+ t += time_step / accelRate; //deceleration
+ else if (node_Idx > 1 && path[node_Idx-1].actionFlag == 2)
+ t += time_step / accelRate; //acceleration

This comment has been minimized.

@teyrnon

teyrnon May 11, 2012

Contributor

in both cases time increases oO
t -= time_step / accelRate maybe?

Maybe i'm wrong, but where is the code that detects the case when transport accelerates to maximum and velocity no more grows?

@teyrnon

teyrnon May 11, 2012

Contributor

in both cases time increases oO
t -= time_step / accelRate maybe?

Maybe i'm wrong, but where is the code that detects the case when transport accelerates to maximum and velocity no more grows?

This comment has been minimized.

@Null45

Null45 May 19, 2012

if (path[node_Idx].actionFlag == 2)
t -= time_step / accelRate; //deceleration

ofc.

@Null45

Null45 May 19, 2012

if (path[node_Idx].actionFlag == 2)
t -= time_step / accelRate; //deceleration

ofc.

This comment has been minimized.

@teyrnon

teyrnon May 19, 2012

Contributor

@Null45 deceleration increases total movement time

@teyrnon

teyrnon May 19, 2012

Contributor

@Null45 deceleration increases total movement time

This comment has been minimized.

@Null45

Null45 May 19, 2012

Ohhh. Sry, needs to sleep:)

@Null45

Null45 May 19, 2012

Ohhh. Sry, needs to sleep:)

@Shauren

This comment has been minimized.

Show comment
Hide comment
@Shauren

Shauren Jun 1, 2012

Member

192241 Not boardable - Horde gunship patrolling above Icecrown ("Orgrim's Hammer") 1424158 2730879 1306721 91.7539 192242 Not boardable - Alliance gunship patrolling above Icecrown ("The Skybreaker") 1051387 1770464 719077 68.3932 181688 Menethil Harbor, Wetlands and Valgarde, Howling Fjord ("Northspear") 445534 553189 107655 24.1631

entry | name | retail period | calculated period | difference | percent error
As you see, your generated times have up to 90% of error rate, which is completely unacceptable. Closing this.

Member

Shauren commented Jun 1, 2012

192241 Not boardable - Horde gunship patrolling above Icecrown ("Orgrim's Hammer") 1424158 2730879 1306721 91.7539 192242 Not boardable - Alliance gunship patrolling above Icecrown ("The Skybreaker") 1051387 1770464 719077 68.3932 181688 Menethil Harbor, Wetlands and Valgarde, Howling Fjord ("Northspear") 445534 553189 107655 24.1631

entry | name | retail period | calculated period | difference | percent error
As you see, your generated times have up to 90% of error rate, which is completely unacceptable. Closing this.

@Shauren Shauren closed this Jun 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment