mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge branch 'master' of http://github.com/btd/DDRace
This commit is contained in:
commit
6505e21a0d
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue