JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.04k stars 617 forks source link

Flechette alt fire sticking #489

Open eezstreet opened 10 years ago

eezstreet commented 10 years ago

Flechette alt fire (in SP/JK2 at least) is all kinds of glitchy with regards to bouncing off of walls. When firing at sentry droids (the ones that float and deploy a shield), the projectiles will very frequently get stuck in midair. They also tend to get stuck on Mark 1s and Mark 2s.

A few different routes we could take with this:

  1. just make the projectiles explode when hitting these NPCs (but don't do any damage to shielded sentries)
  2. apply a think function to the alt fire rounds and trace down every 250ms or so, if we're stuck in midair, the projectile ought to reset its bounce count and use TR_GRAVITY or something
  3. apply some fudging factor to the projectile's bouncing so it doesn't get stuck

I'm not sure if this applies to repeater alt fire, but it might. I'm not sure if it's due to the size of the projectile or what.

ensiform commented 10 years ago

shot2014-07-31_08-42-24

Razish commented 10 years ago

Even with the reverted framerate? @TheSil might have something to say about this

ensiform commented 10 years ago

Yes haven't used sv_fps != 20 in SP in a long time

TheSil commented 10 years ago

I love how github sends email when someone mentions your name :). Anyway im not aware of the bug related to sentries, only bug im aware of is that if you stand too close to a wall and fire alt flechette then it gets stuck in it (https://dl.dropboxusercontent.com/u/61761465/jka/demos/flechette_stuck.dm_26). Is that related?

EDITED: managed to fix the one i described, see https://github.com/TheSil/base_enhanced/commit/5f2fff4a3f99388dcafa16830027a21651a71571. It was caused by not properly passing mins/maxs to WP_TraceSetStart during flechette firing, so it failed to detect that there is a wall between shooter and muzzle point. Now it should clip properly, but i have no idea if this has any impact on what was this issue originally about.

ensiform commented 10 years ago

Doesn't seem to help the SP issue that I pointed out. I couldn't even reproduce @eezstreet's original issue.

However the issue I pointed out does not happen in MP with or without your fix.