Commit MetaInfo

Revision500db4a19ff25db1008b1018ae3076afd083dcc5 (tree)
Time2012-05-27 19:46:53
AuthorBenjamin Berkels <torr.samaho@quan...>
CommiterBenjamin Berkels

Log Message

[TIHan, Torr Samaho] Fixed: Spectators were affected by SetPlayerProperty and SetActorProperty.

Change Summary

Incremental Difference

diff -r 849d5e8e93f5 -r 500db4a19ff2 docs/Skulltag Version History.txt
--- a/docs/Skulltag Version History.txt Sun May 27 10:51:05 2012 +0200
+++ b/docs/Skulltag Version History.txt Sun May 27 12:46:53 2012 +0200
@@ -231,6 +231,7 @@
231231 - - Fixed: Wound state changes weren't sent to clients. [Dusk, Torr Samaho]
232232 - - Fixed: The server always instructed clients to use the standard pain state of an actor, not any custom one. [Dusk, Torr Samaho]
233233 - - 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]
234235 ! - Changed F12 to allow spectators full spying, with the exception of during LMS if it's disabled. [Eruanna]
235236 ! - Changed F12 to allow full demo spying. [Eruanna]
236237 ! - Players aren't forced to spectate after a "changemap" map change on a server with a join password anymore. [Torr Samaho]
diff -r 849d5e8e93f5 -r 500db4a19ff2 src/p_acs.cpp
--- a/src/p_acs.cpp Sun May 27 10:51:05 2012 +0200
+++ b/src/p_acs.cpp Sun May 27 12:46:53 2012 +0200
@@ -2748,6 +2748,11 @@
27482748 {
27492749 return;
27502750 }
2751+
2752+ // [WS/BB] Do not do this for spectators.
2753+ if ( actor->player && actor->player->bSpectating )
2754+ return;
2755+
27512756 switch (property)
27522757 {
27532758 case APROP_Health:
diff -r 849d5e8e93f5 -r 500db4a19ff2 src/p_lnspec.cpp
--- a/src/p_lnspec.cpp Sun May 27 10:51:05 2012 +0200
+++ b/src/p_lnspec.cpp Sun May 27 12:46:53 2012 +0200
@@ -2882,6 +2882,12 @@
28822882
28832883 if (arg0 == 0)
28842884 {
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+
28852891 if (arg1)
28862892 { // Give power to activator
28872893 if (power != 4)
@@ -2916,7 +2922,8 @@
29162922
29172923 for (i = 0; i < MAXPLAYERS; i++)
29182924 {
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)
29202927 continue;
29212928
29222929 if (arg1)
Show on old repository browser