Add the passing finale fix

This commit is contained in:
Jackzie 2021-03-18 10:50:35 -05:00
parent ba1d683875
commit 3c2faf7792
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
2 changed files with 2 additions and 9 deletions

View file

@ -239,6 +239,7 @@ public void OnMapStart() {
char map[16]; char map[16];
GetCurrentMap(map, sizeof(map)); GetCurrentMap(map, sizeof(map));
if(StrEqual(map, "c6m3_port")) { if(StrEqual(map, "c6m3_port")) {
UnhookEvent("door_open", Event_DoorOpen);
HookEvent("door_open", Event_DoorOpen); HookEvent("door_open", Event_DoorOpen);
} }
} }
@ -255,13 +256,6 @@ public Action Event_DoorOpen(Event event, const char[] name, bool dontBroadcast)
} }
IsTemporarilyL4D2[0] = true; IsTemporarilyL4D2[0] = true;
UnhookEvent("door_open", Event_DoorOpen); UnhookEvent("door_open", Event_DoorOpen);
}
public void OnClientPutInServer(int client) {
RequestFrame(Frame_PutInServer, client);
}
public void Frame_PutInServer(int client) {
} }
//On finale start: Set back to their L4D1 character. //On finale start: Set back to their L4D1 character.
public Action Event_FinaleStart(Event event, const char[] name, bool dontBroadcast) { public Action Event_FinaleStart(Event event, const char[] name, bool dontBroadcast) {
@ -278,8 +272,7 @@ public Action Event_FinaleStart(Event event, const char[] name, bool dontBroadca
//Either use preferred model OR find the least-used. //Either use preferred model OR find the least-used.
public Action Event_PlayerFirstSpawn(Event event, const char[] name, bool dontBroadcast) { public Action Event_PlayerFirstSpawn(Event event, const char[] name, bool dontBroadcast) {
int client = GetClientOfUserId(event.GetInt("userid")); int client = GetClientOfUserId(event.GetInt("userid"));
if(IsFakeClient(client)) return; //Have to ignore bots for now, due to idle bots if(client > 0 && GetClientTeam(client) == 2 && !IsFakeClient(client)) {
if(GetClientTeam(client) == 2) {
//todo: hCookiesEnabled.IntVal //todo: hCookiesEnabled.IntVal
if(++survivors > 4 && g_iPendingCookieModel[client] > 0) { if(++survivors > 4 && g_iPendingCookieModel[client] > 0) {
//A model is set: Fetched from cookie //A model is set: Fetched from cookie