He he, I'm just talking about the last revision I committed today: 1.1 branch rev310.
So here is my published comment for that r310 (with original typos ):
sg_tequila wrote:Weapon fire code refactoring:
- Added Weapon_Trace API to easily add trace debugging entity in debug build
It is now possible to visually debug trace on client side (only in debug build)
- Added g_debugWeapon cvar in debug build
- Review some code in prevision to higher refactoring:
FireWeapon & ShotgunPellet should share some code in next update
- Really check we are not shooting ourself
- Added shader and picture to draw trace debuggung entities
- Added sg_developer.pk3 PAK creation and copy in copyfiles-debug target
So I rewrote some part of the API, that's a real weapon fire code refactoring. That wasn't my real goal at the beginning, but I was checking some "entities" problems to have my final "stucking bug patch" working for the next beta release... And I triggered some bugs... Yeah, that's my job I like bugs as they're scratching me
Then to beat that new bugs, I wanted new tools around the weapon fire APIs and the major one for which I published this rev310 is the availability to visually debug the trace system... What's that ? That's the bullet collision calculations toward enemies and windows to break
Anyone involved should review the code and help as he can.
That weapon fire code refactoring is a first stage as it still show me many trace bugs... Especially in the shoot through walls stuff... So it's really time to fix all that old and nasty bugs, guys... My stucking bug patch will wait.
To illustrate, I uploaded a video on the video section of my Moddb profile:
I'll try also to upload it on my Youtube profile.
I'll prepare another video with what I still noticed but if any coder want to help now, you should know BG_ShootThruWall() API from bg_misc.c is completly bugged and really need a big refactoring.
Few bugs to fix because of BG_ShootThruWall:
1. Can't shoot through doors and some other entities, like first shoot in a window won't go through...
2. Can't shoot through curves
3. You can shoot through 3 to 4 solid walls (not wood), here that's the thickness balance which seems bad.
For the ones, wanting to test the trace debug system, you'll need to build a debug release as that system won't be released in official releases. Then you'll have to create a sg_developer.pk3 with the /misc/media stuffs I added (linux users should use copyfiles-debug target). Setting g_debugWeapon will do the rest. Hum I really want a wiki to describe precisely all the process