]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable deglobalisation logging, saves a tiny bit of performance
authorMario <mario.mario@y7mail.com>
Fri, 1 Jul 2022 13:59:50 +0000 (23:59 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 1 Jul 2022 13:59:50 +0000 (23:59 +1000)
Remove an unnecessary engine function call, may save a bit of performance when lots of projectiles are bouncing off eachother

qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/lib/deglobalization.qh
qcsrc/server/weapons/common.qc

index 40d6cbbc2b6c2d4a93727927645993e04ed7b524..435e9bbcb5f7e5e7a9a697752a128136019a70be 100644 (file)
@@ -265,7 +265,7 @@ void MoveToLast(entity e)
        AuditLists();
 }
 
-float RegisterTeam(entity Team)
+void RegisterTeam(entity Team)
 {
        assert_once(Team.team, eprint(Team));
        entity tm;
@@ -281,7 +281,6 @@ float RegisterTeam(entity Team)
        if(Team.team && Team.team != NUM_SPECTATOR)
                ++team_count;
        AuditLists();
-       return true;
 }
 
 void RemoveTeam(entity Team)
@@ -320,7 +319,7 @@ entity GetTeam(int Team, bool add)
        return tm;
 }
 
-.float has_team;
+.bool has_team;
 bool SetTeam(entity o, int Team)
 {
        TC(int, Team);
@@ -367,7 +366,7 @@ bool SetTeam(entity o, int Team)
                {
                        tm = GetTeam(o.team, false);
                        tm.team_size -= 1;
-                       o.has_team = 0;
+                       o.has_team = false;
                        return true;
                }
        }
@@ -378,7 +377,7 @@ bool SetTeam(entity o, int Team)
                        o.team = Team;
                        tm = GetTeam(Team, true);
                        tm.team_size += 1;
-                       o.has_team = 1;
+                       o.has_team = true;
                        return true;
                }
                else if(Team != o.team)
index 7be53f6dee116b558d6a14a931c7aee72bf5d991..ee42bb55c6a06d2317720c7d672ceb56f62fbb86 100644 (file)
@@ -53,7 +53,7 @@ void RemovePlayer(entity player);
 
 void MoveToLast(entity e);
 
-float RegisterTeam(entity Team);
+void RegisterTeam(entity Team);
 
 void RemoveTeam(entity Team);
 
index 3f71fd8ace4cf920e5a036047208b14b20f8bdeb..58f11edc7ab4312bb8bfbe2d4763665e4e596bbb 100644 (file)
@@ -34,7 +34,7 @@
 #ifdef GAMEQC // menu doesn't use any globals
 
 // compile time switches in case perf is an issue
-#define DEGLOB_LOGGING 1
+#define DEGLOB_LOGGING 0
 #define DEGLOB_CLEAR 1
 
 const int DEGLOB_ORIGINAL = 1;
index a00eb120ee8d9fa213e8e8fea68f4241220642bb..60fa5d73af501e44339c00dbd12375d7fb0fdb44 100644 (file)
@@ -123,7 +123,6 @@ 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); // TODO: .health is checked in the engine with this, possibly replace with a QC function?
        }
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
         return true;