Graf Zahl wrote:It WILL crash if someone clears the Firehands states off a child class.
I tested this myself even before I commited this.
See for yourself:
test.pk3
- (371 Bytes) Downloaded 49 times
The new player class clears out FireHands.
It doesn't crash and the strifehands layer is properly destroyed.
I'm wondering if you even bothered to read the commit messages I made..
Graf Zahl wrote:It's the second time that you reverted code that got added by someone else without thinking it through.
You admitted yourself the first time that your change wasn't needed. All it does codewise is a simple syntax change from "GetPSprite()->SetState()" to "P_SetPsprite()".
Even for debugging, if all you want is to debug specific layers before setstate is called then what's wrong with just setting the breakpoint in GetPSprite and checking the layer there?
Graf Zahl wrote:And what's it with shoving all code into the generic functions? No, that's not the way to do it! I very intentionally set the position info for STRIFEHANDS outside of the SetState function and I am going to remove more such special cases when I find the time.
What? I didn't even touch SetState..
GetPSprite is far from being a generic function (again it's only intended to be used with the old layers) and neither are the strife action functions.
Besides, you were the one complaining about having specific checks all over. MC even asked you if what you wanted is to have them all in P_SetPsprite (which was remplaced by GetPSprite in my submission) and even went as far as to make a pull request about it.
Why suddenly change your mind like that? Just to make it harder for people doing submissions?
[quote="Graf Zahl"]It WILL crash if someone clears the Firehands states off a child class.[/quote]
I tested this myself even before I commited this.
See for yourself:
[attachment=0]test.pk3[/attachment]
The new player class clears out FireHands.
It doesn't crash and the strifehands layer is properly destroyed.
I'm wondering if you even bothered to read the commit messages I made..
[quote="Graf Zahl"]It's the second time that you reverted code that got added by someone else without thinking it through.[/quote]
You admitted yourself the first time that your change wasn't needed. All it does codewise is a simple syntax change from "GetPSprite()->SetState()" to "P_SetPsprite()".
Even for debugging, if all you want is to debug specific layers before setstate is called then what's wrong with just setting the breakpoint in GetPSprite and checking the layer there?
[quote="Graf Zahl"]And what's it with shoving all code into the generic functions? No, that's not the way to do it! I very intentionally set the position info for STRIFEHANDS outside of the SetState function and I am going to remove more such special cases when I find the time.[/quote]
What? I didn't even touch SetState..
GetPSprite is far from being a generic function (again it's only intended to be used with the old layers) and neither are the strife action functions.
Besides, you were the one complaining about having specific checks all over. MC even asked you if what you wanted is to have them all in P_SetPsprite (which was remplaced by GetPSprite in my submission) and even went as far as to make a pull request about it.
Why suddenly change your mind like that? Just to make it harder for people doing submissions?