TheSil / base_enhanced

sil's base_enhanced server mod
3 stars 4 forks source link

Players who are midair can be telefragged by newly-spawning players #118

Closed deathsythe47 closed 9 years ago

deathsythe47 commented 9 years ago

JK3 is supposed to avoid using spawnpoints that would cause a telefrag if used.

I have only seen two telefrags since I've played siege. Both times, the guy who got killed was midair force jumping.

I wonder if the detection for avoiding telefrags doesn't properly detect players who are midair?

deathsythe47 commented 9 years ago

Can provide demo if needed

deathsythe47 commented 9 years ago

I actually found a youtube video that contains a telefrag. It's one of Turkey's lame old frag videos with mostly unimpressive frags...lol https://youtu.be/XU99Cn2H0ik?t=2m20s

2:20 time in the video

entdark commented 9 years ago

It's a feature, not a bug. Telefrags are telefrags. It works as intended.

deathsythe47 commented 9 years ago

Look at the code first. Spawn code avoids spots that would telefrag.

/*
================
SelectRandomDeathmatchSpawnPoint

go to a random point that doesn't telefrag
================
*/
        if ( SpotWouldTelefrag( spot ) ) {
            continue;
        }
deathsythe47 commented 9 years ago

To clarify: This is for spawning, not teleporting (I wrote this in the original comment)

TheSil commented 9 years ago

I have briefly looked at it and it seems to be caused by the fact the the position that is checked against possible telefragging is a bit different from actual position during spawn. For some reason, devs added this line to both SelectCTFSpawnPoint and SelectSiegeSpawnPoint:

origin[2] += 9;

So when someone is just slightly above the hitbox of the spawn, it can avoid the SpotWouldTelefrag() detection, yet being considered during actual spawn. I tried to remove this for CTF spawn and spawns seem to be alright. I wonder why they added this +9 correction...

deathsythe47 commented 9 years ago

Welcome back Sil :kiss:

TheSil commented 9 years ago

Thanks, it's good to be back!

TheSil commented 9 years ago

I have tried this on siege and it actually causes some animation issues on some spawns, so instead of removing += 9 stuff (it is actually on few other places as well), i have strengthened the SpotWouldTelefrag() checking. Since this is quite rare issue, im gonna close it and if it reappears in the future, it can be reopened.