RePugMod icon indicating copy to clipboard operation
RePugMod copied to clipboard

Feat/knife round

Open antoniofulg opened this issue 3 years ago • 1 comments

  • Adicionada Cvar pug_play_knife_round para habilitar/desabilitar round faca após a escolha dos times

  • Adicionado parâmtro para forçar o round faca mesmo que a Cvar pug_play_knife_round. (Na escolha de times, selecionar a opção Round Faca

  • Alterado estado chamado quando o admin força o início da partida.

    Esse PR já está com as correções do PR de Overtime. 
    

antoniofulg avatar Jul 06 '22 16:07 antoniofulg

A única alteração no código da PugMod.cpp foi de:

bool CPugMod::StartMatch(CBasePlayer* Player)
{
	if (this->m_State == PUG_STATE_WARMUP || this->m_State == PUG_STATE_HALFTIME)
	{
		gUtil.SayText(NULL, Player->entindex(), _T("\3%s\1 started match."), STRING(Player->edict()->v.netname));

		if (this->m_State == PUG_STATE_HALFTIME)
		{
			this->NextState(1.0);
		}
		else
		{
			this->SetState(PUG_STATE_FIRST_HALF);
		}

		return true;
	}
	else
	{
		gUtil.SayText(Player->edict(), PRINT_TEAM_RED, _T("Cannot start match in \3%s\1 state."), this->GetStateName());
	}

	return false;
}

Para:

bool CPugMod::StartMatch(CBasePlayer* Player)
{
	if (this->m_State == PUG_STATE_WARMUP || this->m_State == PUG_STATE_HALFTIME)
	{
		gUtil.SayText(NULL, Player->entindex(), _T("\3%s\1 started match."), STRING(Player->edict()->v.netname));

		this->NextState(1.0);

		return true;
	}
	else
	{
		gUtil.SayText(Player->edict(), PRINT_TEAM_RED, _T("Cannot start match in \3%s\1 state."), this->GetStateName());
	}

	return false;
}

O resto foi apenas identação automática do Visual Studio.

antoniofulg avatar Jul 06 '22 16:07 antoniofulg