-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
magiclysm: replace spell_effect_line #35345
Merged
KorGgenT
merged 8 commits into
CleverRaven:master
from
OrenAudeles:magiclysm_spell_line
Nov 23, 2019
Merged
magiclysm: replace spell_effect_line #35345
KorGgenT
merged 8 commits into
CleverRaven:master
from
OrenAudeles:magiclysm_spell_line
Nov 23, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the leg along the nonprimary axis extends past the perpendicular line going through the target incorrect results will be generated.
KorGgenT
reviewed
Nov 6, 2019
KorGgenT
reviewed
Nov 6, 2019
KorGgenT
reviewed
Nov 6, 2019
KorGgenT
reviewed
Nov 6, 2019
@KorGgenT I think the |
KorGgenT
reviewed
Nov 9, 2019
// Orientation of point C relative to line AB | ||
static int side_of( const point &a, const point &b, const point &c ) | ||
{ | ||
int cross = ( ( b.x - a.x ) * ( c.y - a.y ) - ( b.y - a.y ) * ( c.x - a.x ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
int cross = ( ( b.x - a.x ) * ( c.y - a.y ) - ( b.y - a.y ) * ( c.x - a.x ) ); | |
const int cross = ( ( b.x - a.x ) * ( c.y - a.y ) - ( b.y - a.y ) * ( c.x - a.x ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
Mods: Magiclysm
Anything to do with the Magiclysm mod
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Bugfixes "Fix holes in spell_effect::spell_effect_line"
Purpose of change
Previous implementation occasionally misses tiles that should be hit in some orientations.
Describe the solution
Currently does not work outside of 2D space. Allowing 3D line spells is work for the future.
Testing
Tossed around some Megablast spells in a group of zombies, did not see holes where there shouldn't be holes.
Additional context
All targeting a tile diagonally away from the Player to most easily demonstrate holes in current implementation