Hey, would something that prevents any visual change on the player's sprite when crouching be possible?
A flag that would no longer make the sprite distort to half its' height or something like a +PLAYERPAWN.NOCROUCHMORPH
I get the point that a squished sprite is still better representation of crouch than nothing, but I think people should be able to opt out, and simply have crouch not modify anything visual. This also ties up to possible inconsistency issues when the player sprite has more skins like for different weapons, but the engine only allows for one set of crouch sprites, so the crouch animation will only be available for one of the skins, while the rest will do the standard morph.
Flag to prevent player sprite squish when crouching?
Moderator: GZDoom Developers
Re: Flag to prevent player sprite squish when crouching?
What happens when you define "Player.CrouchSprite" to simply be the same sprite set as the one you are already using?
I am not sure if it'll work but it's something worth a try.
[wiki]Classes:PlayerPawn[/wiki]
I am not sure if it'll work but it's something worth a try.
[wiki]Classes:PlayerPawn[/wiki]
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Flag to prevent player sprite squish when crouching?
I just tried this in a playerpawn's Tick() and it works:It didn't work when I tried it almost a year ago but I'm glad it does now!
EDIT: Wait, I hadn't checked if this works:
Code: Select all
if(player.getgender())crouchsprite=getspriteindex("TROOA1");
else crouchsprite=getspriteindex("PLYCA1");
EDIT: Wait, I hadn't checked if this works:
Code: Select all
if(player.getgender()){
sprite=getspriteindex("SARGA1");
crouchsprite=getspriteindex("TROOA1");
}else{
sprite=getspriteindex("PLAYA1");
crouchsprite=getspriteindex("PLYCA1");
}
Re: Flag to prevent player sprite squish when crouching?
It only works for the default states. But if I crouch in my other spawn/see states (defined for other weapons), I get the shrink effect.Rachael wrote:What happens when you define "Player.CrouchSprite" to simply be the same sprite set as the one you are already using?
I am not sure if it'll work but it's something worth a try.
[wiki]Classes:PlayerPawn[/wiki]
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Flag to prevent player sprite squish when crouching?
Expected/hoped:Matt wrote:Code: Select all
if(player.getgender()){ sprite=getspriteindex("SARGA1"); crouchsprite=getspriteindex("TROOA1"); }else{ sprite=getspriteindex("PLAYA1"); crouchsprite=getspriteindex("PLYCA1"); }
SARG while not crouching and non-male
TROO while crouching and non-male
PLAY/PLYC while male
Actual:
SARG while not crouching and non-male
SARG-squished while crouching and non-male
PLAY/PLYC while male
It's the same as it was when I posted that other thread.
We still have no way at all of properly replacing all the player sprites dynamically including the crouch sprites (at least without some really gross morph hack and I don't even know if that would work), so this is still an open issue.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Flag to prevent player sprite squish when crouching?
That's simply because the player wasn't made for more than one sprite name. It was made even less for such sprite name hacks.