clintbellanger / flare

Free Libre Action Roleplaying Engine
http://clintbellanger.net/rpg/
GNU General Public License v3.0
166 stars 41 forks source link

Shield only works when assigned power id=11 #856

Closed makrohn closed 11 years ago

makrohn commented 12 years ago

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

dorkster commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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

stefanbeller commented 12 years ago

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 commented 12 years ago

Also see 015cf2d5fbd8d692e2c5ea1ffc1c6e0ba9f9a9d0