Problem with Last MAn Standing "Tap Out" Message


(FREAK!!!) #1

i’ve trouble with the reinforment-message “in last man standing you have to tap out before respawning”.

for me its difficult, because this a server <-> client relationship and so i can’t find what i need…

i have created 2 new gametypes, so i “copy&paste” the LMS-Gametype and did my changes.

the problem is, after the warm-up the match should begin, but all players spawn dead, so the messages appears.

i think, the game checks, if the player has 0 health and then pop-up the message.
and somewhere around there must be the problem…
but i can’t find the lines, where the this happens.

first i thought, it’s a problem in g_client.c because i did change to the start health of the players, but it doesn’t seemed so, because it works fine in all other gametypes.

but here is the code, from g_client.c

void ClientSpawn( gentity_t *ent, qboolean revived )
{
.
.
.
	// JPW NERVE -- increases stats[STAT_MAX_HEALTH] based on # of medics in game
	AddMedicTeamBonus( client );

	// END		Mad Doctor I changes, 8/17/2002
.
.
.
}

i changed it to:


	// JPW NERVE -- increases stats[STAT_MAX_HEALTH] based on # of medics in game


	// Enemy Arena NoSkilling and Health Routines
	if ( g_gametype.integer == GT_WOLF_EAS || g_gametype.integer == GT_WOLF_EAT )
	{
		if ( ea_starthealth.integer < 50 || ea_starthealth.integer > 500 )
		{
			client->pers.maxHealth = 300;
		}
		else client->pers.maxHealth = ea_starthealth.integer;
	}
	else
	{	
		if ( ea_noskilling.integer == 0 )
		{
			AddMedicTeamBonus( client );
		}
		else
		{
			client->pers.maxHealth = 125;
		}
	}
	// Enemy Arena - End

	// END		Mad Doctor I changes, 8/17/2002

well, as i said, the code works for all gametypes including standard LMS… but not for my gametypes and so i think, somewhere with the reinforcement message must be the problem.

so, can anyone say, where the server calls the client to display it!?


(FREAK!!!) #2

i found the solution.

client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth;

was missing after

client->pers.maxHealth = 125;

now i can set the starthealth indiviuality and all gametypes work fine.

if someone want the full code for this, say it and i can write a short tutorial for customable starthealth :slight_smile: