-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Raycast function returns what it hit #2631
Conversation
LGTM, for what little good it does. |
little good??? I need this. |
If I understand this change correctly, from a user perspective it does nothing. Why do you need this change? |
I'm trying to change zeekling's behaviour in order to make it more predictable: #2624 |
No, I mean my opinion does you little good, you need mrkubax or Vankata or Tobbi or any other C++ coder (up to and including Semphriss, I assume) to this go ahead, the fact I approve is not going to help you. |
ah sorry for misunderstanding ur right |
Apparently designated initializers (i.e. |
huh???? ive been doing c++17??? How do i initialize then? Every other way has resulted in compiler error. Any examples? |
You are probably using GCC which is much less pedantic about standard than for example Clang or MSVC (though it tends to add it's own weird features lol). |
First define the union RaycastHit
{
const CollisionObject* object;
const Tile* tile;
};
struct RaycastResult
... Then use it in RaycastHit hit; Initialize it the normal way (for example): RaycastHit hit;
hit.tile = tile; And use in return value: return {true, hit, tilebox}; |
I see. Do they get initialized as nullptr by default? |
I believe i was using clang at the time |
Since all |
No description provided.