New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boats spawn underwater #147

Closed
Aivar-RoR opened this Issue Apr 3, 2015 · 13 comments

Comments

Projects
None yet
5 participants
@Aivar-RoR

Aivar-RoR commented Apr 3, 2015

Boats that are spawned via the port building are spawned underwater, the same thing happens with boats that are placed on terrain. Boats that are underwater get deformed, some can be fixed with backspace, some cannot.
Tried with North St. Helens, Island, Starling Island.

@Max98 Max98 added the bug label Apr 3, 2015

@Max98 Max98 added this to the RoR 0.4.5 (Nextstable) milestone Apr 3, 2015

@only-a-ptr only-a-ptr self-assigned this Jun 11, 2015

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Jun 11, 2015

Member

@Aivar-RoR : Please post me download links to the boats you tested with, along with comments how exactly they behave (the backspace key etc...)

Member

only-a-ptr commented Jun 11, 2015

@Aivar-RoR : Please post me download links to the boats you tested with, along with comments how exactly they behave (the backspace key etc...)

@Aivar-RoR

This comment has been minimized.

Show comment
Hide comment
@Aivar-RoR

Aivar-RoR Jun 11, 2015

C1 boat: http://www.rigsofrods.com/repository/view/1227
Weasel Boat 0.4.0.7 version: http://www.rigsofrods.com/repository/view/5301
Houseboat: http://www.rigsofrods.com/repository/view/3764
Wahoo: http://www.rigsofrods.com/repository/view/3746
Atlas tug: http://www.rigsofrods.com/repository/view/5300
All of these boats spawn underwater when spawned via walking into the port building or when the are placed on a terrain. When underwater, the boats deform. Hitting backspace a few times rotates them, raises them to the surface and fixes the deformation.
Smit Rotterdam tug: http://www.rigsofrods.com/repository/view/3749
Spawns underwater, usually with 100% destruction. Cannot be fixed with the backspace key: this just rotates the tug, but it doesn't surface nor fix the tug. Happens both when spawned via the port building or when placed on a terrain.

All of the boats work fine when spawned from the in-game menu.

Just re-checked in test build 3.

Aivar-RoR commented Jun 11, 2015

C1 boat: http://www.rigsofrods.com/repository/view/1227
Weasel Boat 0.4.0.7 version: http://www.rigsofrods.com/repository/view/5301
Houseboat: http://www.rigsofrods.com/repository/view/3764
Wahoo: http://www.rigsofrods.com/repository/view/3746
Atlas tug: http://www.rigsofrods.com/repository/view/5300
All of these boats spawn underwater when spawned via walking into the port building or when the are placed on a terrain. When underwater, the boats deform. Hitting backspace a few times rotates them, raises them to the surface and fixes the deformation.
Smit Rotterdam tug: http://www.rigsofrods.com/repository/view/3749
Spawns underwater, usually with 100% destruction. Cannot be fixed with the backspace key: this just rotates the tug, but it doesn't surface nor fix the tug. Happens both when spawned via the port building or when placed on a terrain.

All of the boats work fine when spawned from the in-game menu.

Just re-checked in test build 3.

@Max98 Max98 modified the milestones: Post-Nextstable, RoR 0.4.5 (Nextstable) Aug 11, 2015

@Hiradur Hiradur modified the milestones: Post-Nextstable, 0.4.6.0 Oct 24, 2015

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Nov 18, 2015

Member

@Aivar-RoR I'm assuming the "starling island" you refer to is this conversion: http://www.rigsofrods.com/threads/109425-Updated-terrains-for-0-4-0-7?p=1260243&viewfull=1#post1260243 >> RoR 0.4.5 Terrains

Member

only-a-ptr commented Nov 18, 2015

@Aivar-RoR I'm assuming the "starling island" you refer to is this conversion: http://www.rigsofrods.com/threads/109425-Updated-terrains-for-0-4-0-7?p=1260243&viewfull=1#post1260243 >> RoR 0.4.5 Terrains

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Nov 20, 2015

Member

@Aivar-RoR : Okay I started with "Starling island". I downloaded all the content you linked above. I observe 2 sunken boats:
_1. The weasel. Spawns completely on the bottom, no damage. When entered, RoR goes haywire: game lags, camera is placed all wrong, backspace doesn't work..
screenshot_8
EDIT: Test of v0.4.0.7: Spawns at the bottom. When entered, can be controlled normally, except it't stuck at the bottom. After lifted by backspace, sails normally and can touch shore/port without side effects.

_2. The Smit. Spawns without damage, lies on the bottom and there are water splashes falling from the sky as if it just sank. Can be entered normally, except it won't sail. backspace works, but the boat always sinks back down. Controls also work, but the boat only moves until it hits bottom.
EDIT: Test of v0.4.0.7: Smit spawns at the bottom as well. When lifted with backspace, it will float and sail. However - the moment it touches any object (be it port border or bottom) it instantly sinks like a rock. Did RoR always behave this way?
screenshot_9

IMPORTANT: What do you mean by "walk into port building"? I failed to find the place. Can you give me more detail?
screenshot_7

Anything I missed?
Do you observe the same behavior?

Member

only-a-ptr commented Nov 20, 2015

@Aivar-RoR : Okay I started with "Starling island". I downloaded all the content you linked above. I observe 2 sunken boats:
_1. The weasel. Spawns completely on the bottom, no damage. When entered, RoR goes haywire: game lags, camera is placed all wrong, backspace doesn't work..
screenshot_8
EDIT: Test of v0.4.0.7: Spawns at the bottom. When entered, can be controlled normally, except it't stuck at the bottom. After lifted by backspace, sails normally and can touch shore/port without side effects.

_2. The Smit. Spawns without damage, lies on the bottom and there are water splashes falling from the sky as if it just sank. Can be entered normally, except it won't sail. backspace works, but the boat always sinks back down. Controls also work, but the boat only moves until it hits bottom.
EDIT: Test of v0.4.0.7: Smit spawns at the bottom as well. When lifted with backspace, it will float and sail. However - the moment it touches any object (be it port border or bottom) it instantly sinks like a rock. Did RoR always behave this way?
screenshot_9

IMPORTANT: What do you mean by "walk into port building"? I failed to find the place. Can you give me more detail?
screenshot_7

Anything I missed?
Do you observe the same behavior?

@DarthCainRor

This comment has been minimized.

Show comment
Hide comment
@DarthCainRor

DarthCainRor Nov 21, 2015

Not certain here, but I believe he may be talking about the boat spawner building.
screenshot_194
The boat spawn menu appears when entering this door.
screenshot_195

DarthCainRor commented Nov 21, 2015

Not certain here, but I believe he may be talking about the boat spawner building.
screenshot_194
The boat spawn menu appears when entering this door.
screenshot_195

@Aivar-RoR

This comment has been minimized.

Show comment
Hide comment
@Aivar-RoR

Aivar-RoR Nov 21, 2015

@DarthCainRor Indeed, I'm talking about the building you mentioned.
@only-a-ptr I observe the same behaviour you described (both the 0.4.0.7 and 0.4.5.1 descriptions). RoR hasn't always behaved like this.
A few screenshots from 0.39.5 (the only version I have installed besides 0.4.0.7 and 0.4.5.1) and 0.4.5.1.
smit_0 39
smit_0 4
weasel_0 39
weasel_0 4
As you can see the aforementioned boats worked fine in 0.39.5.
The Smit tug spawned fine from RoR versions 0.32 to 0.39.7. (I have tested every single RoR version since 0.32 throughout the years).
It seems as if something has changed in the way how RoR handles boat spawning. Perhaps this behaviour has to do with the underwater camera that was added in 0.4.x (cannot remember exactly)?

Similarly, a few years ago some change in RoR's code broke truck spawning (or simply changed something) via the .terrn file: trucks spawned in the air. Then the truck2 option was added so one could spawn the truck on the ground.

Aivar-RoR commented Nov 21, 2015

@DarthCainRor Indeed, I'm talking about the building you mentioned.
@only-a-ptr I observe the same behaviour you described (both the 0.4.0.7 and 0.4.5.1 descriptions). RoR hasn't always behaved like this.
A few screenshots from 0.39.5 (the only version I have installed besides 0.4.0.7 and 0.4.5.1) and 0.4.5.1.
smit_0 39
smit_0 4
weasel_0 39
weasel_0 4
As you can see the aforementioned boats worked fine in 0.39.5.
The Smit tug spawned fine from RoR versions 0.32 to 0.39.7. (I have tested every single RoR version since 0.32 throughout the years).
It seems as if something has changed in the way how RoR handles boat spawning. Perhaps this behaviour has to do with the underwater camera that was added in 0.4.x (cannot remember exactly)?

Similarly, a few years ago some change in RoR's code broke truck spawning (or simply changed something) via the .terrn file: trucks spawned in the air. Then the truck2 option was added so one could spawn the truck on the ground.

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Nov 23, 2015

Member

@Aivar-RoR Thanks for those clues into RoR's history, they help me a lot. From now on, you're my "go-to" person regarding RoR's past versions. While I can dig out a lot of details from the codebase, it won't give me enough of a context to see entire features and their evolution.

Please start a "RoR Development History Timeline" topic in forum/development and document the boat/truck-spawning features and changes in versions 0.38+. I'll help by digging into the code.

Current development repository (imported from sourceforge Mercurial):

Newest commits: https://github.com/RigsOfRods/rigs-of-rods/commits/master
Oldest commits: https://github.com/RigsOfRods/rigs-of-rods/commits/master?page=35

Legacy 0.3x repo (imported from sourceforge SVN):

Newest commits: https://github.com/only-a-ptr/ror-legacy-svn-trunk/commits/master
Oldest commits: https://github.com/only-a-ptr/ror-legacy-svn-trunk/commits/master?page=80

Member

only-a-ptr commented Nov 23, 2015

@Aivar-RoR Thanks for those clues into RoR's history, they help me a lot. From now on, you're my "go-to" person regarding RoR's past versions. While I can dig out a lot of details from the codebase, it won't give me enough of a context to see entire features and their evolution.

Please start a "RoR Development History Timeline" topic in forum/development and document the boat/truck-spawning features and changes in versions 0.38+. I'll help by digging into the code.

Current development repository (imported from sourceforge Mercurial):

Newest commits: https://github.com/RigsOfRods/rigs-of-rods/commits/master
Oldest commits: https://github.com/RigsOfRods/rigs-of-rods/commits/master?page=35

Legacy 0.3x repo (imported from sourceforge SVN):

Newest commits: https://github.com/only-a-ptr/ror-legacy-svn-trunk/commits/master
Oldest commits: https://github.com/only-a-ptr/ror-legacy-svn-trunk/commits/master?page=80

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Nov 23, 2015

Contributor

"RoR Development History Timeline"

It would also be nice to have an overview of features which old versions have while newer versions don't.

Contributor

Hiradur commented Nov 23, 2015

"RoR Development History Timeline"

It would also be nice to have an overview of features which old versions have while newer versions don't.

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Nov 23, 2015

Member

@Hiradur I'm counting that into the "timeline" concept ... chronologically list all features, their inception and eventual removal. With notes on historical context and eventual unsolicited changes in behavior. In fact, pinpointing past features missing from current version is the main goal.

Such a listing might get fuzzy. For example, there's Aperion's "engine spasm fix" (truckfile keyword patchEngineTorque) http://www.rigsofrods.com/threads/54676-engine-spasm-fix?p=571718&viewfull=1#post571718 added in 2009 and used, for example, by famous Tatra-Dakar. For some reason, it was removed by Ulteq in 480afed. The question is - did Ulteq remove a working feature, or was the feature already obsoleted by something else? There were extensions to engoption in the meantime.

Member

only-a-ptr commented Nov 23, 2015

@Hiradur I'm counting that into the "timeline" concept ... chronologically list all features, their inception and eventual removal. With notes on historical context and eventual unsolicited changes in behavior. In fact, pinpointing past features missing from current version is the main goal.

Such a listing might get fuzzy. For example, there's Aperion's "engine spasm fix" (truckfile keyword patchEngineTorque) http://www.rigsofrods.com/threads/54676-engine-spasm-fix?p=571718&viewfull=1#post571718 added in 2009 and used, for example, by famous Tatra-Dakar. For some reason, it was removed by Ulteq in 480afed. The question is - did Ulteq remove a working feature, or was the feature already obsoleted by something else? There were extensions to engoption in the meantime.

@Aivar-RoR

This comment has been minimized.

Show comment
Hide comment
@Aivar-RoR

Aivar-RoR Nov 25, 2015

@only-a-ptr Will start a thread about the timeline once I'm finished with the translation in Transifex.

Aivar-RoR commented Nov 25, 2015

@only-a-ptr Will start a thread about the timeline once I'm finished with the translation in Transifex.

@Aivar-RoR

This comment has been minimized.

Show comment
Hide comment

Aivar-RoR commented Nov 30, 2015

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Dec 9, 2015

Member

Browsing code

0.39.5

Preloading vehicles: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/gameplay/RoRFrameListener.cpp#L5071
Spawning vehicles: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/gameplay/RoRFrameListener.cpp#L5331
BeamFactory: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/BeamFactory.cpp#L115
Positioning: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/Beam.cpp#L5421

0.4.5

Preloading:

if ((!strcmp(oname, "truck")) || (!strcmp(oname, "load") || (!strcmp(oname, "machine")) || (!strcmp(oname, "boat")) || (!strcmp(oname, "truck2")) ))

Spawning:
void TerrainObjectManager::loadPreloadedTrucks()

BeamFactory:
Beam *BeamFactory::CreateLocalRigInstance(

Postioning
/* Place correctly */

The positioning part is different.

0.39.5 has 2 variants of "resetPosition()" function:

(f,f,b,f) this one spawns boats https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/Beam.cpp#L1642)
(v3,b) https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/Beam.cpp#L1713

0.4.5 has 3:

!NEW! (f,f,b) this one spawns boats

void Beam::resetPosition(float px, float pz, bool setInitPosition)

(f,f,b,f)
void Beam::resetPosition(float px, float pz, bool setInitPosition, float miny)

(v3,b)
void Beam::resetPosition(Vector3 translation, bool setInitPosition)

Member

only-a-ptr commented Dec 9, 2015

Browsing code

0.39.5

Preloading vehicles: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/gameplay/RoRFrameListener.cpp#L5071
Spawning vehicles: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/gameplay/RoRFrameListener.cpp#L5331
BeamFactory: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/BeamFactory.cpp#L115
Positioning: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/Beam.cpp#L5421

0.4.5

Preloading:

if ((!strcmp(oname, "truck")) || (!strcmp(oname, "load") || (!strcmp(oname, "machine")) || (!strcmp(oname, "boat")) || (!strcmp(oname, "truck2")) ))

Spawning:
void TerrainObjectManager::loadPreloadedTrucks()

BeamFactory:
Beam *BeamFactory::CreateLocalRigInstance(

Postioning
/* Place correctly */

The positioning part is different.

0.39.5 has 2 variants of "resetPosition()" function:

(f,f,b,f) this one spawns boats https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/Beam.cpp#L1642)
(v3,b) https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/c01d3eacb66406d9defd05700fde3cf8d4af1ffe/source/main/physics/Beam.cpp#L1713

0.4.5 has 3:

!NEW! (f,f,b) this one spawns boats

void Beam::resetPosition(float px, float pz, bool setInitPosition)

(f,f,b,f)
void Beam::resetPosition(float px, float pz, bool setInitPosition, float miny)

(v3,b)
void Beam::resetPosition(Vector3 translation, bool setInitPosition)

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Dec 11, 2015

Contributor

today's observation: If you set the y coordinate of pre-spawned boats to 0 in the corresponding *.tobj file of the map then they spawn at water level, tested with different maps and boats.
So obviously a preset value for y (height) is screwing up the positioning. Gotta find out where the problem is but that's for another day.

I can't test with the boat spawner building due to #462

Contributor

Hiradur commented Dec 11, 2015

today's observation: If you set the y coordinate of pre-spawned boats to 0 in the corresponding *.tobj file of the map then they spawn at water level, tested with different maps and boats.
So obviously a preset value for y (height) is screwing up the positioning. Gotta find out where the problem is but that's for another day.

I can't test with the boat spawner building due to #462

ulteq added a commit to ulteq/rigs-of-rods that referenced this issue Jan 12, 2016

only-a-ptr added a commit that referenced this issue Jan 13, 2016

Merge pull request #562 from ulteq/resetPositionFix
[Bugfix] Prevents boats from spawning underwater (#147)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment