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
|
@ -168,7 +168,7 @@ void CLaser::DoBounce()
|
||||||
}
|
}
|
||||||
|
|
||||||
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||||
if (m_Owner >= 0 && m_Energy <= 0 && m_Pos && !m_TeleportCancelled && pOwnerChar &&
|
if (m_Owner >= 0 && m_Energy <= 0 && m_Pos && !m_TeleportCancelled && pOwnerChar &&
|
||||||
pOwnerChar->IsAlive() && pOwnerChar->m_HasTeleLaser && m_Type == WEAPON_RIFLE)
|
pOwnerChar->IsAlive() && pOwnerChar->m_HasTeleLaser && m_Type == WEAPON_RIFLE)
|
||||||
{
|
{
|
||||||
vec2 PossiblePos;
|
vec2 PossiblePos;
|
||||||
|
@ -238,6 +238,15 @@ void CLaser::Reset()
|
||||||
|
|
||||||
void CLaser::Tick()
|
void CLaser::Tick()
|
||||||
{
|
{
|
||||||
|
if(g_Config.m_SvDestroyLasersOnDeath && m_Owner >= 0)
|
||||||
|
{
|
||||||
|
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||||
|
if(!(pOwnerChar && pOwnerChar->IsAlive()))
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float Delay;
|
float Delay;
|
||||||
if (m_TuneZone)
|
if (m_TuneZone)
|
||||||
Delay = GameServer()->TuningList()[m_TuneZone].m_LaserBounceDelay;
|
Delay = GameServer()->TuningList()[m_TuneZone].m_LaserBounceDelay;
|
||||||
|
|
|
@ -145,7 +145,7 @@ void CProjectile::Tick()
|
||||||
{
|
{
|
||||||
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
|
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);
|
GameServer()->m_World.DestroyEntity(this);
|
||||||
return;
|
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(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(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(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")
|
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