My test server is completely vanilla with minimal plugins / extensions installed.
The only cvars I'm using at the moment are these to keep the server from shutting down when I go to spectate and there's no other human survivors.
Though on another server I had the same issue happen and I didn't have any of these cvars enabled:
using this test plugin in the video. In most of the clips on that YouTube link I'm already on team spectate:
Spoiler
PHP Code:
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
#pragma newdecls required
#define SPEC 1
#define SURV 2
#define INF 3
public Plugin myinfo = {
name = "camera test",
author = "dustin",
description = "quick test",
version = "1.0",
url = ""
};
public void OnPluginStart()
{
RegAdminCmd("sm_spawncamera", Command_SpawnCamera, ADMFLAG_GENERIC);
}
public Action Command_SpawnCamera(int client, int args)
{
if (!client || !IsClientInGame(client))
{
ReplyToCommand(client, "can only use this command in-game.");
return Plugin_Handled;
}
public Action Timer_SlayAll(Handle timer, any data)
{
for (int i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i)) continue;
if (GetClientTeam(i) == SURV || GetClientTeam(i) == INF)
ForcePlayerSuicide(i);
}
return Plugin_Handled;
}
Sorry for all the bumps but it's important to me that this plugin actually works.
I'm out of ideas on how to debug the issue further and have already tried hacky stuff like teleporting spectators shortly after "rout_start" gets called which didn't work.
edit:
Issue appears to only occur on linux servers. The "ohm's server example" video and Martt both used windows and they couldn't reproduce the issue. ohm looked at the source code for his plugin and said his method of dispatching the "point_viewcontrol_multiplayer" entity was exactly the same and he doesn't use any special methods of disabling it beforhand (just lets it kill itself when the round resets).
Last edited by dustinandband; 11-14-2019 at 14:47.