Jump to content

Home

Laming Protect


Darth*krisz

Recommended Posts

Here's what was done in Legacy OJP. I made a small modification so you can still be damaged in a duel.

 

In bg_pmove.c, in the void PmoveSingle (pmove_t *pmove) function change this:

 

// set the talk balloon flag
if ( pm->cmd.buttons & BUTTON_TALK ) {
	pm->ps->eFlags |= EF_TALK;
} else {
	pm->ps->eFlags &= ~EF_TALK;
}

to this:

// set the talk balloon flag
if ( pm->cmd.buttons & BUTTON_TALK ) {
	pm->ps->eFlags |= EF_TALK;
	if ( !pm->ps->duelInProgress )
	{
		pm->ps->eFlags |= EF_INVULNERABLE;
	}
} else {
	pm->ps->eFlags &= ~EF_TALK;
	if ( !pm->ps->duelInProgress )
	{
		pm->ps->eFlags &= ~EF_INVULNERABLE;
	}
}

If you don't want the green bubble to appear when you are chatting, modify this code in cg_players.c in the void CG_Player( centity_t *cent ) function from:

if (cent->currentState.eFlags & EF_INVULNERABLE)
{
	CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.0f, cgs.media.invulnerabilityShader );
}

 

To this:

if (cent->currentState.eFlags & EF_INVULNERABLE)
{
	if ( !(cent->currentState.eFlags & EF_TALK) )
	{
		CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.0f, cgs.media.invulnerabilityShader );
	}
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...