-
Notifications
You must be signed in to change notification settings - Fork 165
Fix Issue #43 - Prevent MP loss when casting spell while swimming #142
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
Fix Issue #43 - Prevent MP loss when casting spell while swimming #142
Conversation
Update to Latest Code
…efore deducting mana
lheckemann
left a comment
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.
Good in principle, but increases duplication even further than it's already gone. I'm not in favour of merging this as is.
Also the ever-present indentation issues — I'm going to stop mentioning those in the rest of my reviews, I'm sure you've got the idea now ;)
| } | ||
|
|
||
| // If both cases are false, the Caster could potentially be swimming | ||
| if ( bIsCasterLevitating != true && bIsCasterWaterWalking != true ) |
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.
!= true is redundant on bools :)
| return; | ||
| } | ||
|
|
||
| // Check to make sure the Caster is not swimming |
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.
There's a lot of conditions here which are duplicated (not only in here but in actplayer.cpp, acthudweapon.cpp, which should probably be factored out to reduce the duplication and the amount of code that needs to be changed should additional conditions for swimming be added.
|
I'll review this one further today or tomorrow.
null
|
This is a fix for #43.
The issue was twofold: