[Mod] Carts [carts]
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
Your screenshot - this is correct movement:
x+
x+
x+
y-
x+
y-
x+
y-
x+
y-
x+
x+
Here is what mine does (sometimes):
x+
x+
x+
y-
x+
y-
x+ <---- after this point the cart:on_step() didnt get called until the cart moved twice in the X+ direction
y- <---- at this point there is no track at y-1 (the track is at y-2), the cart stops
Note, this only happens on a really long descent. And I think it never happens on the way back up.
x+
x+
x+
y-
x+
y-
x+
y-
x+
y-
x+
x+
Here is what mine does (sometimes):
x+
x+
x+
y-
x+
y-
x+ <---- after this point the cart:on_step() didnt get called until the cart moved twice in the X+ direction
y- <---- at this point there is no track at y-1 (the track is at y-2), the cart stops
Note, this only happens on a really long descent. And I think it never happens on the way back up.
Last edited by cornernote on Wed Aug 01, 2012 01:15, edited 1 time in total.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Yes. It is the same problem. The cart moves on its one and the on_step() method (wich controls the cart) is only called every 0.25 sec. (or something like that). So if the server lags the control method cant control the cart -> problems appear.cornernote wrote:im not sure, but it might also have the same effect if you have lots and lots of corners and no straight track?
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 65
- Joined: Tue Jul 31, 2012 07:38
- Location: italy
-
- Member
- Posts: 65
- Joined: Tue Jul 31, 2012 07:38
- Location: italy
it appear sometimes. Does it appear when i go far away from a cart and the cart stop or disappears.PilzAdam wrote:Never had this error. Does it appear when you go far away from a cart and then come back to it?pagliaccio wrote:error[serverthread] serverenvironement deactivatefarObjects(): id=74 m_static_exists=true but static data doesn't actually exist in (3,0,-2)
Does it appear always or just sometimes?
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
The cart is an object and objects only can move if there is a player near by. If all players go far away the engine creates something that is called "static data" to save the current state of the cart. When you go closer the engine gives the static data back to the cart, so the cart knows what to do.pagliaccio wrote:it appear sometimes. Does it appear when i go far away from a cart and the cart stop or disappears.PilzAdam wrote:Never had this error. Does it appear when you go far away from a cart and then come back to it?pagliaccio wrote:error[serverthread] serverenvironement deactivatefarObjects(): id=74 m_static_exists=true but static data doesn't actually exist in (3,0,-2)
Does it appear always or just sometimes?
It seems that there appear problems when the static data are created in your game.
Could you please answer the following questions:
- Wich version of Minetest do you use (please not only "0.4")?
- Wich version of the carts mod do you use?
- Wich other mods do you have installed.
- Do you have any other problems with any mod?
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Ive implemented it in version 28. The sounds are now played randomly.Ragnarok wrote:I made a bit more natural sound for cart. Do you like it?:
http://speedy.sh/r4dPu/carts-cart-sound.ogg
License: WTFPL
-
- Member
- Posts: 65
- Joined: Tue Jul 31, 2012 07:38
- Location: italy
PilzAdam wrote:The cart is an object and objects only can move if there is a player near by. If all players go far away the engine creates something that is called "static data" to save the current state of the cart. When you go closer the engine gives the static data back to the cart, so the cart knows what to do.pagliaccio wrote:it appear sometimes. Does it appear when i go far away from a cart and the cart stop or disappears.PilzAdam wrote: Never had this error. Does it appear when you go far away from a cart and then come back to it?
Does it appear always or just sometimes?
It seems that there appear problems when the static data are created in your game.
Could you please answer the following questions:
- Wich version of Minetest do you use (please not only "0.4")?
- Wich version of the carts mod do you use?
- Wich other mods do you have installed.
- Do you have any other problems with any mod?
- v 0.4.1
- 25 but now try a new version
-
- Member
- Posts: 65
- Joined: Tue Jul 31, 2012 07:38
- Location: italy
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
This is an engine thing. I cant change anything about that. Sorry.pagliaccio wrote:i have a make a rail for connect a mine width castle and return. cart stop at midle way. not return.PilzAdam wrote:Tell me if the bug is stiil there.pagliaccio wrote: but now try a new version
the problem is the long distance.
-
- Member
- Posts: 65
- Joined: Tue Jul 31, 2012 07:38
- Location: italy
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Added in version 29.PilzAdam wrote:I will add something like this.cornernote wrote:[REQUEST] - locked cart / dropoff / pickup
CART - this cart only allows the owner to start/stop and pickup the cart
DROPOFF /PICKUP - instead of just throwing items on the ground, they are placed in a chest that only the player can access
What about with detecting of kinds of rails? Is it possible?
my mods: infrastructure_modpack | papyrus_bed | papyrus_door my blog: radekslowik.pl
I say about playing carts_straight_rails.ogg when cart is over straight rails, carts_curved_rails.ogg when cart is at the turn and carts_railway_crossover.ogg when cart cross the intersection.
my mods: infrastructure_modpack | papyrus_bed | papyrus_door my blog: radekslowik.pl
The sounds are too long to play them on a single rail - I agree - but you can detect whether the rail is changed, and then play the sound carts_curved_rails.ogg or carts_railway_crossover.ogg for a while according to the type of rail. Over straight rails should be played carts_straight_rails.ogg. The question is: how to detect rails?
my mods: infrastructure_modpack | papyrus_bed | papyrus_door my blog: radekslowik.pl
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
This is possible. Rails use the param2 variable so you can see wether they are curved or straight etc.. And with the get_new_direction() of the cart you can simulate the next 4 to 5 steps so you can detect the rails and check wether they are curved etc.Ragnarok wrote:The sounds are too long to play them on a single rail - I agree - but you can detect whether the rail is changed, and then play the sound carts_curved_rails.ogg or carts_railway_crossover.ogg for a while according to the type of rail. Over straight rails should be played carts_straight_rails.ogg. The question is: how to detect rails?
But I dont want to add this. I want some sounds that are played randomly.
Who is online
Users browsing this forum: No registered users and 32 guests