Page 1 of 1

[Spearhead] Opposite team + hide = fake avatar

Posted: Sun Oct 16, 2005 11:05 am
by Rookie One.pl
Hi,

Been trying to port a mod of mine to Spearhead and discovered one thing - if you hide a player, the opposite team will see an avatar of their own team above his head, which makes hiding him pointless. E.g. if you hide an axis player, the allies will not see the player but they will see the allied avatar above him and their crosshairs will turn green when they look at him. This happens in Spearhead only.

Just thought I would share the (bug) discovery.

Rookie One

Posted: Sun Oct 16, 2005 8:25 pm
by mefy
I don't understand why you're having this problem because in Freeze Tag I'm hiding players without any bugs like that. The avatar only shows to a player's own teammates.

Posted: Sun Oct 16, 2005 8:46 pm
by Rookie One.pl
Have you tried it in Spearhead? This is true, this bug has ruined a whole mod idea. Or at least made porting it to the expansion packs impossible.

Posted: Mon Oct 17, 2005 1:15 am
by mefy
Yes it runs in all versions. Maybe you should post your code.

Posted: Mon Oct 17, 2005 7:37 am
by lizardkid
actually it does happen, when i paly freezetag and am spectating someone or i see someonebeing spectated i see little avatars zooming around them. So the player model is hidden but not the avatar.

But this is odd, or intentional, because i see this in AA too.

Posted: Mon Oct 17, 2005 1:42 pm
by Rookie One.pl
Yeah, those avatars do appear in Freeze Tag. But the thing is, in Spearhead this happens for the opposite team. In my case it was an axis player with an allied avatar above his head. I just hide him, I don't do anything special.

This is a part of the FAKK code responsible for the hide command:

Code: Select all

inline void Entity::hideModel
	(
	void
	)

	{
	edict->s.renderfx |= RF_DONTDRAW;
	if ( getSolidType() <= SOLID_TRIGGER )
		{
		edict->svflags |= SVF_NOCLIENT;
		}
	}
And this is the SVF_NOCLIENT flag definition:

Code: Select all

#define	SVF_NOCLIENT			      (1<<0)	// don't send entity to clients, even if it has effects
This made me think this would make a hidden player not play footstep sounds, so I used the svflags "+broadcast" command just in case. Can't see any connection between this and the way the client game library does its team checks.