Page 1 of 1

[Inconsistency] HUD weapon vanishes with +INVISIBLE flag.

Posted: Tue Feb 12, 2013 5:23
by Rachael
There is a minor inconsistency in the two renderers. In ZDoom's renderer, setting the player's +INVISIBLE flag does not cause the on-screen weapon to vanish, however, in GZDoom's renderer, it does. It stays visible in GZDoom's software renderer as well, consistent with ZDoom's behavior.
Spoiler: sample code
To reproduce, simply paste the above code into a decorate.txt file, -file it, and then use "Give invisible" from the console.

Without knowing which one is intended, I'm just going to drop this here. It may be that the weapon is supposed to vanish in both renderers, or that it's supposed to stay visible in both renderers, but right now, the two renderers do two different things, hence the bug report. If it's supposed to disappear then it's obviously a ZDoom bug and not a GZDoom bug, and I'll forward the report appropriately.

Re: [Inconsistency] HUD weapon vanishes with +INVISIBLE flag

Posted: Tue Feb 12, 2013 15:52
by Gez
Software:

Code: Select all

void R_DrawPlayerSprites ()
{
	int 		i;
	int 		lightnum;
	pspdef_t*	psp;
	sector_t*	sec = NULL;
	static sector_t tempsec;
	int			floorlight, ceilinglight;
	F3DFloor *rover;

	if (!r_drawplayersprites ||
		!camera->player ||
		(players[consoleplayer].cheats & CF_CHASECAM))
		return;
<more code>
OpenGL:

Code: Select all

void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
{
	bool statebright[2] = {false, false};
	unsigned int i;
	pspdef_t *psp;
	int lightlevel=0;
	fixed_t ofsx, ofsy;
	FColormap cm;
	sector_t * fakesec, fs;
	AActor * playermo=players[consoleplayer].camera;
	player_t * player=playermo->player;
	
	if(!player || playermo->renderflags&RF_INVISIBLE || !r_drawplayersprites ||
		mViewActor!=playermo || playermo->RenderStyle.BlendOp == STYLEOP_None) return;
<more code>
So the conditions are a bit different. r_drawplayersprites is common to both, and I suppose mViewActor!=playermo might be equivalent to the !camera->player and consoleplayer & chasecam check; but the checks for invisibility from a RenderStyle of "None" or the INVISIBLE flag are added specifically to GZDoom while ZDoom doesn't have them.

Re: [Inconsistency] HUD weapon vanishes with +INVISIBLE flag

Posted: Tue Feb 12, 2013 19:28
by Enjay
I guess a question related to this is what is the most logical/consistent/desired behaviour?

To be logical and consistent, IMO the OpenGL behaviour is best based on what happens with the Doom partial invisibility powerup (and others from the original games). I'm not sure either way if that behaviour is also the most desirable. Desirable in terms of logical/consistent (again) but perhaps less so from an actually playing perspective.

Re: [Inconsistency] HUD weapon vanishes with +INVISIBLE flag

Posted: Fri Feb 15, 2013 23:30
by Rachael
I can definitely say that from a playing perspective it's not quite so desirable, but from a modder's perspective it might be. As a player, not seeing your weapon on the screen makes it difficult to know what you're attacking with, and weapon selection is a bit guess-and-hope.

Re: [Inconsistency] HUD weapon vanishes with +INVISIBLE flag

Posted: Sat Nov 30, 2013 13:01
by Graf Zahl
Changed for consistency's sake.