This commit is contained in:
GreYFoXGTi 2010-10-24 02:13:05 +02:00
commit 6505e21a0d
4 changed files with 10 additions and 13 deletions

View file

@ -144,4 +144,7 @@ MACRO_CONFIG_STR(SvRulesLine8, sv_rules_line8, 40, "", CFGFLAG_SERVER, "Rules li
MACRO_CONFIG_STR(SvRulesLine9, sv_rules_line9, 40, "", CFGFLAG_SERVER, "Rules line 9", 4)
MACRO_CONFIG_STR(SvRulesLine10, sv_rules_line10, 40, "", CFGFLAG_SERVER, "Rules line 10", 4)
//MACRO_CONFIG_INT(SvReconnectTime, sv_reconnect_time,5,0,9999,CFGFLAG_SERVER, "The time in seconds between leaves and joins of clients with the same ip", 3)
MACRO_CONFIG_INT(SvTeam, sv_team, 0, -1, 1, CFGFLAG_SERVER, "Teams configuration", 4)
MACRO_CONFIG_INT(SvTeamStrict, sv_team_strict, 0, 0, 1, CFGFLAG_SERVER, "Kill or not all team if someone left game in team", 4)
#endif

View file

@ -310,7 +310,7 @@ void CCharacter::FireWeapon()
{
// reset objects Hit
m_NumObjectsHit = 0;
GameServer()->CreateSound(m_Pos, SOUND_HAMMER_FIRE);
GameServer()->CreateSound(m_Pos, SOUND_HAMMER_FIRE, Teams()->TeamMask(Team()));
if (!g_Config.m_SvHit) break;
@ -376,7 +376,7 @@ void CCharacter::FireWeapon()
Server()->SendMsg(&Msg, 0, m_pPlayer->GetCID());
GameServer()->CreateSound(m_Pos, SOUND_GUN_FIRE);
GameServer()->CreateSound(m_Pos, SOUND_GUN_FIRE, Teams()->TeamMask(Team()));
} break;
case WEAPON_SHOTGUN:
@ -442,7 +442,7 @@ void CCharacter::FireWeapon()
Msg.AddInt(((int *)&p)[i]);
Server()->SendMsg(&Msg, 0, m_pPlayer->GetCID());
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE);
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE, Teams()->TeamMask(Team()));
} break;
case WEAPON_RIFLE:

View file

@ -107,13 +107,10 @@ void CProjectile::Tick()
)
{
isWeaponCollide = true;
TeamMask = OwnerChar->Teams()->TeamMask( OwnerChar->Team());
//TeamMask = OwnerChar->Teams()->TeamMask( OwnerChar->Team());
}
else if
(
OwnerChar &&
OwnerChar->m_Alive
)
if (OwnerChar &&
OwnerChar->m_Alive)
{
TeamMask = OwnerChar->Teams()->TeamMask( OwnerChar->Team());
}

View file

@ -135,10 +135,7 @@ int CGameTeams::TeamMask(int Team) {
if(Team == TEAM_SUPER) return -1;
int Mask = 0;
for(int i = 0; i < MAX_CLIENTS; ++i) {
if(m_Core.Team(i) == Team
|| (Character(i)
&& Character(i)->GetPlayer())
|| m_Core.Team(i) == TEAM_SUPER) {
if(Character(i) && (m_Core.Team(i) == Team || m_Core.Team(i) == TEAM_SUPER)) {
Mask |= 1 << i;
}
}