Page 5 of 6
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 6:49 am
by Amuscaria
Does this mean I can finally put ammo counters on weapon sprites?

Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 7:28 am
by Gez
Yes, looks like.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 11:43 am
by NeuralStunner
And with a separate layer for each digit, even.
Heck, I'll be happy with putting gunflashes behind the main sprite so I don't have to keep cutting the muzzle shape out of them.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 12:06 pm
by Ed the Bat
I'm happy to see this, but I don't suppose this will help get us any closer to a less hacky solution for Strife's flaming hands? I've always been bothered with how that had to be implemented.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 2:05 pm
by Major Cooke
A simple and easy explanation: multi-threading in a nutshell. You run multiple states at once, with or without graphics, it doesn't matter.

Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 2:24 pm
by NeuralStunner
Ed the Bat wrote:I'm happy to see this, but I don't suppose this will help get us any closer to a less hacky solution for Strife's flaming hands? I've always been bothered with how that had to be implemented.
The problem there is using it with arbitrary weapons. If you're making all-custom weapons, you can inherit from a base class that has special states like this, and do your own switching. Native weapon functions are a pain, but fortunately we have pretty good documentation of those, so they should be relatively easy to replicate with generic functions.
(Are you thinking of Reelism, too?

)
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 2:28 pm
by Ed the Bat
Among other things, yes I am. I just really wish there was a better way to do what A_ItBurnsItBurns does. A (restricted, no less) function from within the playerclass affecting the weapons? Seems iffy at best. And I've heard Graf himself say it's a disgusting hack, the way it is right now.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 3:23 pm
by Edward-san
Not only that, it's also easy to make the program crash badly.
This should mitigate some I discovered.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 3:24 pm
by Major Cooke
Graf will want that in the bug reports section, just an FYI.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 3:26 pm
by Graf Zahl
Why?
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 3:27 pm
by Major Cooke
It was a bug wasn't it?
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 5:16 pm
by Graf Zahl
'Was' being the operative term here.
Re: Generalized the psprite system and made it useable by mo
Posted: Fri Jun 17, 2016 6:07 pm
by Major Cooke
Must've posted at the same time as you had merged it. Oh well.

Re: Generalized the psprite system and made it useable by mo
Posted: Sat Jun 18, 2016 4:09 am
by Leonard2
Here, I fixed the strife hands.
The PR fixes 2 crashes related to strife and one small bug I found.
Hopefully there are no issues left with strife's firehands.
Here are test wads for all the issues I addressed:
Let's just say I "
bought" strife and now I can test it.
Ed the Bat wrote:I just really wish there was a better way to do what A_ItBurnsItBurns does. A (restricted, no less) function from within the playerclass affecting the weapons? Seems iffy at best. And I've heard Graf himself say it's a disgusting hack, the way it is right now.
I guess you simply didn't see it in the thread but this was actually addressed as well.
I generalized it so that you can create overlays from within the player's own body and made strife's firehands use that internally.
Re: Generalized the psprite system and made it useable by mo
Posted: Sat Jun 18, 2016 4:19 am
by Graf Zahl
Why did you 'remove the unneeded checks' that were deliberately added?
It's the second time that you reverted code that got added by someone else without thinking it through.
As a reminder: It WILL crash if someone clears the Firehands states off a child class.
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.