A little side project of mine right now is digging through every line of id Software's code in progs 1.06 and cleaning up, re-organizing, and fixing any bugs. This is in the interest of two things:
1) Fully understand EVERY aspect of the gamecode in EVERY regard
2) Provide a clean, bug-free, OCD-level organized package of source code to start projects from.
All deviations from the original code, including improvements, alterations, and bugfixes, are being logged.
Anyways, I've found a few bugs that to my knowledge have not been documented anywhere, so I thought I'd share my findings and my method of correction.
================================================== ===
Interesting Bug #1: Projectiles pass through Shambler
Go start up Quake (no mods, just id1), do impulse 9, equip the rocket launcher, and find a Shambler. You may want to activate god mode. Start shooting him. Ever notice how every now and then, seemingly at random, a rocket (or nail) will pass right through him? I actually never noticed this till tonight. I tested this on QuakeSpasm and ProQuake with the same results, so I deduced this wasn't strictly an engine thing having to do with entity size or whatever.
Turns out that in the shambler's QC file, the bolt of lightning model that spawns overhead when he's casting his magic attack is assigned his .owner. This is in the interest of tracking the bolt across the Shambler's animation frame functions and changing the bolt's frame as well. After a lot of testing, I discovered that this was the cause of the projectiles intermitently passing through him. I created a new .entity bolt and assigned the model to it. So instead of the bolt being the shambler's 'self.owner', it is now his 'self.bolt'. This appears to have fixed the issue.
I'm almost certain that .owner is referenced somewhere in the engine C code. Too lazy to dig through the engine source. Maybe one of you engine guys knows the connection.
1) Fully understand EVERY aspect of the gamecode in EVERY regard
2) Provide a clean, bug-free, OCD-level organized package of source code to start projects from.
All deviations from the original code, including improvements, alterations, and bugfixes, are being logged.
Anyways, I've found a few bugs that to my knowledge have not been documented anywhere, so I thought I'd share my findings and my method of correction.
================================================== ===
Interesting Bug #1: Projectiles pass through Shambler
Go start up Quake (no mods, just id1), do impulse 9, equip the rocket launcher, and find a Shambler. You may want to activate god mode. Start shooting him. Ever notice how every now and then, seemingly at random, a rocket (or nail) will pass right through him? I actually never noticed this till tonight. I tested this on QuakeSpasm and ProQuake with the same results, so I deduced this wasn't strictly an engine thing having to do with entity size or whatever.
Turns out that in the shambler's QC file, the bolt of lightning model that spawns overhead when he's casting his magic attack is assigned his .owner. This is in the interest of tracking the bolt across the Shambler's animation frame functions and changing the bolt's frame as well. After a lot of testing, I discovered that this was the cause of the projectiles intermitently passing through him. I created a new .entity bolt and assigned the model to it. So instead of the bolt being the shambler's 'self.owner', it is now his 'self.bolt'. This appears to have fixed the issue.
I'm almost certain that .owner is referenced somewhere in the engine C code. Too lazy to dig through the engine source. Maybe one of you engine guys knows the connection.
Comment