float _spectate(entity _player)
{
- if(SpectateNext(_player) == 1)
+ if(Spectate(_player) == 1)
{
PutObserverInServer();
self.classname = "spectator";
(self.autospec_flags& ASF_FLAG_GRAB && _item.classname == "item_flag_team"))
{
- if((self.enemy != other) || self.classname == "observer")
+ if((self.enemy != other) || IS_OBSERVER(self))
{
- if(self.autospec_flags & ASF_OBSERVER_ONLY && self.classname != "observer")
+ if(self.autospec_flags & ASF_OBSERVER_ONLY && !IS_OBSERVER(self))
{
if(self.superspec_flags & SSF_VERBOSE)
superspec_msg("", "", self, sprintf("^8Ignored that %s^8 grabbed %s^8 since the observer_only option is ON\n", other.netname, _item.netname), 2);
if(MUTATOR_RETURNVALUE) // command was already handled?
return FALSE;
- if(self.classname == "player")
+ if(IS_PLAYER(self))
return FALSE;
if(cmd_name == "superspec_itemfilter")
if(cmd_argc == 2)
{
if(argv(1) == "red")
- _team = FL_TEAM_1;
+ _team = NUM_TEAM_1;
else
- _team = FL_TEAM_2;
+ _team = NUM_TEAM_2;
}
FOR_EACH_PLAYER(_player)
MUTATOR_HOOKFUNCTION(superspec_ClientConnect)
{
+ if(!IS_REAL_CLIENT(self))
+ return FALSE;
+
string fn = "superspec-local.options";
float fh;
//MUTATOR_HOOK(MakePlayerObserver, superspec_MakePlayerObserver, CBC_ORDER_ANY);
MUTATOR_HOOK(ClientDisconnect, superspec_ClientDisconnect, CBC_ORDER_ANY);
- MUTATOR_ONADD
- {
- }
-
- MUTATOR_ONREMOVE
- {
- }
-
return 0;
}