mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #1655
1655: Add delete projectiles on death settings r=def- a=12pm Need this for a map fix and doesn't hurt to have for grenades too I guess. Defaults are still the same Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
This commit is contained in:
commit
34542e64b5
|
@ -168,7 +168,7 @@ void CLaser::DoBounce()
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
vec2 PossiblePos;
|
||||
|
@ -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