itslunaranyo / copper

a single-player refinement mod for id software's quake
GNU General Public License v2.0
39 stars 18 forks source link

PR offer: fix for grenade getting stuck down-slope #20

Open 4LT opened 7 months ago

4LT commented 7 months ago

Hey, I have a fix for the grenade getting stuck (player's and ogre's) on slopes that are leading downwards. I'd say it works like 95-99% of the time (my theory is that the grenade still gets stuck if the grenade bounces twice by hitting a wall and the slope in the same frame). It's conservative in that it only affects physics when a grenade hits a downward slope, otherwise it relies on engine physics like normal. I was wondering if a PR to patch it into Copper would get accepted.

I have most of the fix isolated into a single file if you'd like to take a look. The rest is in math.qc and calling the fix from the ogre and player code.

Also, I should mention mg1 also has its own fix. I was first, though ;) well I guess they released first and I haven't, but who's counting?

4LT commented 6 months ago

I went ahead and did the thing