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

[Bugfix] Fixes incorrect 'reset in place' alignment on some trailers/loads #511

Merged
merged 3 commits into from Jan 6, 2016

Conversation

Projects
None yet
5 participants
@ulteq
Contributor

ulteq commented Dec 30, 2015

Fixes #503

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Jan 4, 2016

The cameranodepos[0] / cameranodedir[0] system is pretty arcane code. Coder needs to know RoR jargon to understand it. Truckfile "cameras" and rig_t::cameranode* have nothing to do with camera, really, they orient vehicle in space. I'd like the vars to be named differently at least. Further, do we even need this system? Couldn't the orientation be determined by node coordinates in truckfile?

Further, it looks like the code checks for cameranode* validity and only then uses them. Shouldn't trucks without "camera" not spawn at all?

only-a-ptr commented on ec347a1 Jan 4, 2016

The cameranodepos[0] / cameranodedir[0] system is pretty arcane code. Coder needs to know RoR jargon to understand it. Truckfile "cameras" and rig_t::cameranode* have nothing to do with camera, really, they orient vehicle in space. I'd like the vars to be named differently at least. Further, do we even need this system? Couldn't the orientation be determined by node coordinates in truckfile?

Further, it looks like the code checks for cameranode* validity and only then uses them. Shouldn't trucks without "camera" not spawn at all?

This comment has been minimized.

Show comment
Hide comment
@ulteq

ulteq Jan 4, 2016

Owner

Couldn't the orientation be determined by node coordinates in truckfile?

Probably yes.
Edit: I have come to the conclusion that it is not possible.

Further, do we even need this system?

Without suitable replacement, probably yes.

Owner

ulteq replied Jan 4, 2016

Couldn't the orientation be determined by node coordinates in truckfile?

Probably yes.
Edit: I have come to the conclusion that it is not possible.

Further, do we even need this system?

Without suitable replacement, probably yes.

only-a-ptr added a commit that referenced this pull request Jan 6, 2016

Merge pull request #511 from ulteq/resetAngleHotfix
[Bugfix] Fixes incorrect 'reset in place' alignment on some trailers/loads

@only-a-ptr only-a-ptr merged commit c10f9ac into RigsOfRods:master Jan 6, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ulteq ulteq deleted the ulteq:resetAngleHotfix branch Jan 6, 2016

@AnotherFoxGuy

This comment has been minimized.

Show comment
Hide comment
@AnotherFoxGuy

AnotherFoxGuy Jan 7, 2016

Member

Compiling this with vs10 throws the error
Beam.cpp(1311): error C2039: 'round' : is not a member of 'std'
Beam.cpp(1311): error C3861: 'round': identifier not found

Member

AnotherFoxGuy commented Jan 7, 2016

Compiling this with vs10 throws the error
Beam.cpp(1311): error C2039: 'round' : is not a member of 'std'
Beam.cpp(1311): error C3861: 'round': identifier not found

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr
Member

only-a-ptr commented Jan 7, 2016

@AnotherFoxGuy

This comment has been minimized.

Show comment
Hide comment
@AnotherFoxGuy

AnotherFoxGuy Jan 7, 2016

Member

That throws the error
error C1083: Cannot open include file: 'math': No such file or directory

Member

AnotherFoxGuy commented Jan 7, 2016

That throws the error
error C1083: Cannot open include file: 'math': No such file or directory

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Jan 7, 2016

Contributor

try #include <cmath>
but since round() is a c++11 feature it may be missing in VS 2010

Contributor

Hiradur commented Jan 7, 2016

try #include <cmath>
but since round() is a c++11 feature it may be missing in VS 2010

@AnotherFoxGuy

This comment has been minimized.

Show comment
Hide comment
@AnotherFoxGuy

AnotherFoxGuy Jan 7, 2016

Member

Nope, still throws the error
'round' : is not a member of 'std'

Member

AnotherFoxGuy commented Jan 7, 2016

Nope, still throws the error
'round' : is not a member of 'std'

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Jan 7, 2016

Contributor

It's probably missing in VS 2010 then, similar to #494
Instead of rewriting the C++11 standard library for VS2010 you Windows guys should update your VS. :P

Contributor

Hiradur commented Jan 7, 2016

It's probably missing in VS 2010 then, similar to #494
Instead of rewriting the C++11 standard library for VS2010 you Windows guys should update your VS. :P

@mikadou

This comment has been minimized.

Show comment
Hide comment
@mikadou

mikadou Jan 7, 2016

Contributor

Instead of rewriting the C++11 standard library for VS2010 you Windows guys should update your VS. :P

👍 +1

Contributor

mikadou commented Jan 7, 2016

Instead of rewriting the C++11 standard library for VS2010 you Windows guys should update your VS. :P

👍 +1

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Jan 7, 2016

Member

Instead of rewriting the C++11 standard library for VS2010 you Windows guys should update your VS. :P

👍 😄

Member

only-a-ptr commented Jan 7, 2016

Instead of rewriting the C++11 standard library for VS2010 you Windows guys should update your VS. :P

👍 😄

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