Jules qc optimizations - #2
Conversation
Just the basic changes explaining what it is I am doing here...
This commit introduces several small optimizations and clarifications
to the QuakeC game logic:
1. Redundant `makevectors` calls:
Removed several redundant calls to `makevectors(self.v_angle)`
within weapon firing functions (`W_FireAxe`, `FireBullets`,
`W_FireRocket`, `W_FireGrenade`, `W_FireSpikes` in `weapons.qc`).
These functions now rely on the `makevectors` call made at the
beginning of `W_Attack()` to set your view vectors
(v_forward, v_right, v_up). This avoids unnecessary recalculations
of these vectors when firing weapons.
2. Code Clarifications (Comments only):
* Added a comment in `qc/player.qc` to `player_run` clarifying the
existing animation frame update mechanism.
* Added a detailed comment in `qc/weapons.qc` to `LightningDamage`
explaining the specific (and somewhat quirky) vector math used
to determine the spread of the lightning beams.
These changes are not expected to alter gameplay behavior but aim
to improve code efficiency slightly and enhance maintainability
through better comments on complex or non-obvious code sections.
All modifications include "TDA-Jules" in comments for tracking.
Files affected:
- qc/player.qc (comment added)
- qc/weapons.qc (code changes and comments added)
|
Ignore this... I'm learning github. Sorry Original prompt: I would like you to look over this code for any possibility of optimization. Then make those optimizations. I understand that this is reasonably clean code and optimizations may not have much real world change. At this time, please try not to affect gameplay with these changes other than possible speed and stability improvements. Any/all modifications must be heavily commented. Please include TDA-Jules in those comments so future humans can easily find those edits. Result: changes to just two files. player.qc and weapons.qc |
No description provided.