Disable client prediction when spectating, fixes some issues with QC physics
authorMario <mario@smbclan.net>
Fri, 23 Aug 2019 09:11:36 +0000 (19:11 +1000)
committerMario <mario@smbclan.net>
Fri, 23 Aug 2019 09:11:36 +0000 (19:11 +1000)
qcsrc/server/client.qc

index 5029da7..0034c2d 100644 (file)
@@ -1683,6 +1683,7 @@ void SpectateCopy(entity this, entity spectatee)
        this.effects = spectatee.effects & EFMASK_CHEAP; // eat performance
        SetResourceExplicit(this, RES_HEALTH, GetResource(spectatee, RES_HEALTH));
        CS(this).impulse = 0;
+       this.disableclientprediction = 1; // no need to run prediction on a spectator
        this.items = spectatee.items;
        STAT(LAST_PICKUP, this) = STAT(LAST_PICKUP, spectatee);
        STAT(HIT_TIME, this) = STAT(HIT_TIME, spectatee);