mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add delete projectiles on death settings
This commit is contained in:
parent
bbf485a9ac
commit
a83e3e0d9a
|
@ -238,6 +238,15 @@ void CLaser::Reset()
|
|||
|
||||
void CLaser::Tick()
|
||||
{
|
||||
if(g_Config.m_SvDestroyLasersOnDeath && m_Owner >= 0)
|
||||
{
|
||||
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||
if(!(pOwnerChar && pOwnerChar->IsAlive()))
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
|
||||
float Delay;
|
||||
if (m_TuneZone)
|
||||
Delay = GameServer()->TuningList()[m_TuneZone].m_LaserBounceDelay;
|
||||
|
|
|
@ -145,7 +145,7 @@ void CProjectile::Tick()
|
|||
{
|
||||
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
|
||||
}
|
||||
else if (m_Owner >= 0)
|
||||
else if (m_Owner >= 0 && (m_Weapon != WEAPON_GRENADE || g_Config.m_SvDestroyBulletsOnDeath))
|
||||
{
|
||||
GameServer()->m_World.DestroyEntity(this);
|
||||
return;
|
||||
|
|
|
@ -146,6 +146,8 @@ MACRO_CONFIG_INT(SvOldTeleportHook, sv_old_teleport_hook, 0, 0, 1, CFGFLAG_SERVE
|
|||
MACRO_CONFIG_INT(SvTeleportHoldHook, sv_teleport_hold_hook, 0, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Hold hook when teleported")
|
||||
MACRO_CONFIG_INT(SvTeleportLoseWeapons, sv_teleport_lose_weapons, 0, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Lose weapons when teleported (useful for some race maps)")
|
||||
MACRO_CONFIG_INT(SvDeepfly, sv_deepfly, 1, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Allow fire non auto weapons when deep")
|
||||
MACRO_CONFIG_INT(SvDestroyBulletsOnDeath, sv_destroy_bullets_on_death, 1, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Destroy bullets when their owner dies")
|
||||
MACRO_CONFIG_INT(SvDestroyLasersOnDeath, sv_destroy_lasers_on_death, 0, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Destroy lasers when their owner dies")
|
||||
|
||||
MACRO_CONFIG_INT(SvMapUpdateRate, sv_mapupdaterate, 5, 1, 100, CFGFLAG_SERVER, "64 player id <-> vanilla id players map update rate")
|
||||
|
||||
|
|
Loading…
Reference in a new issue