diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2023-06-10 16:44:19 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2023-06-10 16:51:02 +0100 |
commit | 1c4318331663b152b0b298bd2c9e5c971506a86b (patch) | |
tree | a402681cb84b491819ba5018525c16340110fd4d /src/fov.c | |
parent | 602a18977d500ad068fd63fbedcafb630c29ee72 (diff) |
Prune some comments and tidy up other minor things
Diffstat (limited to 'src/fov.c')
-rw-r--r-- | src/fov.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -44,8 +44,7 @@ static struct con_var *real_fov_desired; // engine's if it has it, or ours typedef void (*VCALLCONV SetDefaultFOV_func)(void *, int); static SetDefaultFOV_func orig_SetDefaultFOV; static void VCALLCONV hook_SetDefaultFOV(void *this, int fov) { - // the game normally clamps fov_desired on the server side, disregard - // whatever it tries to set and force our own value instead + // disregard server-side clamped value and force our own value instead orig_SetDefaultFOV(this, con_getvari(real_fov_desired)); } @@ -53,15 +52,14 @@ static bool find_SetDefaultFOV(struct con_cmd *fov) { const uchar *insns = (const uchar *)fov->cb; int callcnt = 0; for (const uchar *p = insns; p - insns < 96;) { - // fov command source, and consequent asm, calls 4 functions, one of - // them virtual (i.e. via register). of the 3 direct calls, - // SetDefaultFOV is the third. + // The fov command calls 4 functions, one of them virtual. Of the 3 + // direct calls, SetDefaultFOV() is the third. if (p[0] == X86_CALL && ++callcnt == 3) { orig_SetDefaultFOV = (SetDefaultFOV_func)(p + 5 + mem_loadoffset(p + 1)); return true; } - NEXT_INSN(p, "SetDefaultFOV"); + NEXT_INSN(p, "SetDefaultFOV function"); } return false; } |