]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 5029da7df9613f216a5ba89cedd44b70b647e801..0034c2dd9ee3b687a0b600eee0b850cc056dfb89 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);