]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Litter the code with a few notes about where health is accessed in the engine and...
authorMario <mario@smbclan.net>
Sat, 16 Jun 2018 18:45:59 +0000 (04:45 +1000)
committerMario <mario@smbclan.net>
Sat, 16 Jun 2018 18:45:59 +0000 (04:45 +1000)
qcsrc/client/view.qc
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/server/client.qc
qcsrc/server/miscfunctions.qc

index d036bd75df1b95e2552c59741658461796131d43..4d355fb2a177fd5fe102c19ff5b7783381abf227 100644 (file)
@@ -2057,7 +2057,7 @@ void CSQC_UpdateView(entity this, float w, float h)
 
        IL_EACH(g_drawables, it.draw, it.draw(it));
 
-       addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS);
+       addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS); // TODO: .health is used in cl_deathfade (a feature we have turned off currently)
        renderscene();
 
        // now switch to 2D drawing mode by calling a 2D drawing function
index 225c7307ded6c60a192056eafde3078912c4ae52..f87f00033762b4fbe18f2d5305989941a191828b 100644 (file)
@@ -291,7 +291,7 @@ void CSQCPlayer_SetCamera()
                // note: these two only work in WIP2, but are harmless in WIP1
                if (PHYS_HEALTH(NULL) <= 0 && PHYS_HEALTH(NULL) != -666 && PHYS_HEALTH(NULL) != -2342) refdefflags |= REFDEFFLAG_DEAD;
                if (intermission) refdefflags |= REFDEFFLAG_INTERMISSION;
-               V_CalcRefdef(view, refdefflags);
+               V_CalcRefdef(view, refdefflags); // TODO? uses .health stat in the engine when this isn't called here, may be broken!
        }
        else
        {
index 121d092f9592d669720a229157981599b76c118f..0c740545c08d3593af6c5fe8f098125bf0544f2d 100644 (file)
@@ -1082,6 +1082,8 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change,
 
 void ClientKill (entity this)
 {
+       // TODO: once .health is removed, will need to check it here for the "already dead" message!
+
        if(game_stopped) return;
        if(this.player_blocked) return;
        if(STAT(FROZEN, this)) return;
index d4231a70cb6762d826f9c3c15829490e7522647a..319b6f16ff7e3c7c333d8fb3a67e2b360eefbde8 100644 (file)
@@ -1060,7 +1060,7 @@ bool SUB_NoImpactCheck(entity this, entity toucher)
        if(trace_dphitcontents == 0)
        {
                LOG_TRACEF("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct. (edict: %i, classname: %s, origin: %v)", this, this.classname, this.origin);
-               checkclient(this);
+               checkclient(this); // TODO: .health is checked in the engine with this, possibly replace with a QC function?
        }
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
         return true;