[Inconsistency] HUD weapon vanishes with +INVISIBLE flag.

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

[Inconsistency] HUD weapon vanishes with +INVISIBLE flag.

Post 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.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

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

Post 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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

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

Post 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.
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

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

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

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

Post by Graf Zahl »

Changed for consistency's sake.
Locked

Return to “Closed Bugs”