Revision | 500db4a19ff25db1008b1018ae3076afd083dcc5 (tree) |
---|---|
Time | 2012-05-27 19:46:53 |
Author | Benjamin Berkels <torr.samaho@quan...> |
Commiter | Benjamin Berkels |
[TIHan, Torr Samaho] Fixed: Spectators were affected by SetPlayerProperty and SetActorProperty.
@@ -231,6 +231,7 @@ | ||
231 | 231 | - - Fixed: Wound state changes weren't sent to clients. [Dusk, Torr Samaho] |
232 | 232 | - - Fixed: The server always instructed clients to use the standard pain state of an actor, not any custom one. [Dusk, Torr Samaho] |
233 | 233 | - - Fixed: Newly connecting clients were not informed about non-standard death states of corpses already on the map. [Dusk, Torr Samaho] |
234 | +- - Fixed: Spectators were affected by SetPlayerProperty and SetActorProperty. [TIHan, Torr Samaho] | |
234 | 235 | ! - Changed F12 to allow spectators full spying, with the exception of during LMS if it's disabled. [Eruanna] |
235 | 236 | ! - Changed F12 to allow full demo spying. [Eruanna] |
236 | 237 | ! - Players aren't forced to spectate after a "changemap" map change on a server with a join password anymore. [Torr Samaho] |
@@ -2748,6 +2748,11 @@ | ||
2748 | 2748 | { |
2749 | 2749 | return; |
2750 | 2750 | } |
2751 | + | |
2752 | + // [WS/BB] Do not do this for spectators. | |
2753 | + if ( actor->player && actor->player->bSpectating ) | |
2754 | + return; | |
2755 | + | |
2751 | 2756 | switch (property) |
2752 | 2757 | { |
2753 | 2758 | case APROP_Health: |
@@ -2882,6 +2882,12 @@ | ||
2882 | 2882 | |
2883 | 2883 | if (arg0 == 0) |
2884 | 2884 | { |
2885 | + // [WS] If the player is spectating, do nothing. The reason this check is put here and | |
2886 | + // not at the beginning is because we may want the spectator to be able to puke a command | |
2887 | + // that gets activated on all players that are currently spawned/(not spectating). | |
2888 | + if ( it->player && it->player->bSpectating ) | |
2889 | + return false; | |
2890 | + | |
2885 | 2891 | if (arg1) |
2886 | 2892 | { // Give power to activator |
2887 | 2893 | if (power != 4) |
@@ -2916,7 +2922,8 @@ | ||
2916 | 2922 | |
2917 | 2923 | for (i = 0; i < MAXPLAYERS; i++) |
2918 | 2924 | { |
2919 | - if (!playeringame[i] || players[i].mo == NULL) | |
2925 | + // [WS] Do not do this for spectators. | |
2926 | + if (!playeringame[i] || players[i].mo == NULL || players[i].bSpectating) | |
2920 | 2927 | continue; |
2921 | 2928 | |
2922 | 2929 | if (arg1) |