Skip to content
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

Shield only works when assigned power id=11 #856

Closed
makrohn opened this issue Aug 23, 2012 · 6 comments · Fixed by #961
Closed

Shield only works when assigned power id=11 #856

makrohn opened this issue Aug 23, 2012 · 6 comments · Fixed by #961

Comments

@makrohn
Copy link
Contributor

makrohn commented Aug 23, 2012

Which threw me for a total loop in Poly where it's been 3. Seems to have broken about a week ago.

@dorkster
Copy link
Collaborator

This is probably related to #260. When we make status effects more arbitrary, we'll try to get rid of silly restrictions like this one.

@clintbellanger
Copy link
Owner

There's a constant POWER_SHIELD=11 which is currently used for displaying the shield art. Shields should still be working, but not displayed properly if set to another index.

This will all get fixed in v0.18's work to completely revamp the buff/debuff system.

@makrohn
Copy link
Contributor Author

makrohn commented Aug 23, 2012

Well, I also noticed that shield no longer works without a gfx defined. So maybe what happened is that shield requires gfx to be set in order to not crash the game, and since graphics are only loaded if shield id=11, that's why the crash?

@clintbellanger
Copy link
Owner

Sounds like a possibility. In that case we need some error checking to make sure we're not drawing null image pointers.

@stefanbeller
Copy link
Collaborator

drawing null image points is checked in SDL, you can safely pass a null pointer to sdl and it will return having the SDL_ERROR() being able to report the exact problem. It will not crash, but only draw nothing.

@stefanbeller
Copy link
Collaborator

Also see 015cf2d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants