Jump to content

[Patch] Support for npc on transport


Auntie Mangos

Recommended Posts

So this is yet another feature that will be implemented by porting over from Trinity?

I'd rather not see that become a habit. Sometimes, their code is such a mess to port that a developer can likely find a better way of doing it from scratch in less time. If this keeps up, half of the core code will be nothing more than Trinity with a few name changes to variables and functions.

We need better innovation from this community! >:(

Link to comment
Share on other sites

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

We need better innovation from this community! >:(

Sorry i forgot, what was the last innovation you contributed?

Code won't write itself. And writing good code is harder than adding lots of hacks that give the impression as if it was working.

I did briefly look at this stuff and IMHO there's not all that much to build on yet.

You don't need any weird extra table, transports do already have a "virtual" mapid assigned, it will be possible to spawn them like any other creature if you write proper core code.

Also the really difficult part is syncing transport movement properly, infact players are not properly updated either currently.

I see none of that really addressed properly here or in trinity...unless something has signifficantly changed lately.

Link to comment
Share on other sites

We need better innovation from this community! >:(

Sorry i forgot, what was the last innovation you contributed?

Code won't write itself. And writing good code is harder than adding lots of hacks that give the impression as if it was working.

I did briefly look at this stuff and IMHO there's not all that much to build on yet.

You don't need any weird extra table, transports do already have a "virtual" mapid assigned, it will be possible to spawn them like any other creature if you write proper core code.

Also the really difficult part is syncing transport movement properly, infact players are not properly updated either currently.

I see none of that really addressed properly here or in trinity...unless something has signifficantly changed lately.

i dont think anything changed, in any case both TC and mangos transport system is a hack on mapmanager so its only adding hack to hack :P

Link to comment
Share on other sites

And what do you mean by saying player aren't properly update as for now ?

Just go on a zeppelin, do NOT move and watch for creatures nearby...they will all disappear because the client does not send movement updates and so the server thinks you are still standing where the zeppelin started.

There's only some commented code in Transport::Update(), i guess i didn't really work, since no one implemented the actualy spline movement, so positions would be far off anyway.

Link to comment
Share on other sites

  • 2 months later...

First of all, don't alter creature table structure. You just need a column in transport table, that's it.

Let's says you have some npc on boat 176231.

In transport table, add a 'map' column to associate the boat id and the moving map id.

Here 176231 is map 584.

Then in creature table, you don't have to alter anything, just spawn the npcs based on map 584 coords, then it's "just" a matter of sending to the client the proper information with transport guid, local and global coords (related to the moving map 584 and the upper map).

Link to comment
Share on other sites

  • 4 weeks later...
  • 9 months later...
  • 2 weeks later...

And what do you mean by saying player aren't properly update as for now ?

Just go on a zeppelin, do NOT move and watch for creatures nearby...they will all disappear because the client does not send movement updates and so the server thinks you are still standing where the zeppelin started.

There's only some commented code in Transport::Update(), i guess i didn't really work, since no one implemented the actualy spline movement, so positions would be far off anyway.

Actually, they disappear because transport in server-side uses waypoints, and servers sends update data when this waypoint is reached. (Client has exact coordinates of transport every time)

This means, when you are about to reach waypoint X, creature data and transport go data still matches coordinates as if in waypoint X-1. When you try to move or change orientation, new movementinfo is received from client, which makes your player relocate.

In most cases distance between those two waypoints is larger than visibility distance in map, so npcs disappear.

However, if you see npcs on transport and stand still, they wont disappear, that's because player movementinfo updates only upon reaching waypoint.

In trinity there is a bad hack, which makes transport and npc on in relocate on every movementinfo send from any passenger on it, transport position taken from it. If you move everytime, you will see the npcs :D But if you fly nearby and follow transport path, they will disappear eventually.

Perhaps, with SilverIce's spline movement somebody can fix transport update system.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use