Fix some bugs

This commit is contained in:
Jackz 2022-06-29 23:16:51 -05:00
parent e8236a4aab
commit 65d8d01927
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
4 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ bool LoadConfigForMap(const char[] map) {
validSets.Clear();
static char buffer[64];
if(StrEqual(currentSet, "default") && kv.GetString("defaultset", buffer, sizeof(buffer))) {
if(StrEqual(currentSet, "default") && kv.GetString("defaultset", buffer, sizeof(buffer)) && buffer[0] != '\0') {
strcopy(currentSet, sizeof(currentSet), buffer);
}
PrintToServer("[H&S] Loading config data for set %s on %s", currentSet, map);

View file

@ -263,8 +263,6 @@ void SetPeekCamActive(int client, bool active) {
AcceptEntityInput(seekerCam, "Enable", client); // Need to always activate before deactivating to fix a semi-common bug
if(!active) {
AcceptEntityInput(seekerCam, "Disable", client);
AcceptEntityInput(seekerCam, "Kill");
seekerCam = INVALID_ENT_REFERENCE;
}
} else {
PrintToServer("WARN: SetPeekCamActive(%d, %b) when seekerCam invalid", client, active);

View file

@ -269,6 +269,8 @@ public Action Timer_StopPeekCam(Handle h) {
SetPeekCamActive(i, false);
}
}
AcceptEntityInput(seekerCam, "Kill");
seekerCam = INVALID_ENT_REFERENCE;
}
public void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) {