]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
when spectating in nexuiz, use the current viewentity for scoreboard
[xonotic/darkplaces.git] / client.h
index d44d2d034f7d2b2abdbbbd5a33fcab9210f202d5..52a9ce064d28248f6f998da9fd3d106f205f4297 100644 (file)
--- a/client.h
+++ b/client.h
@@ -819,6 +819,11 @@ typedef struct client_state_s
        int viewentity;
        // the real player entity (normally same as viewentity,
        // different than viewentity if mod uses chasecam or other tricks)
+       int realplayerentity;
+       // this is updated to match cl.viewentity whenever it is in the clients
+       // range, basically this is used in preference to cl.realplayerentity for
+       // most purposes because when spectating another player it should show
+       // their information rather than yours
        int playerentity;
        // max players that can be in this game
        int maxclients;
@@ -943,7 +948,7 @@ typedef struct client_state_s
        int qw_teamplay;
 
        // unused: indicates whether the player is spectating
-       // use cl.scores[cl.playerentity].qw_spectator instead
+       // use cl.scores[cl.playerentity-1].qw_spectator instead
        //qboolean qw_spectator;
 
        // movement parameters for client prediction