This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sourcemod> | |
| #include <sdktools> | |
| #include <left4downtown> | |
| #include <l4d2_direct> | |
| #define L4D2UTIL_STOCKS_ONLY | |
| #include <l4d2util> | |
| //#include <sendproxy> | |
| public Action:L4D2_OnEndVersusModeRound(bool:countSurvivors) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <left4downtown> | |
| Handle:g_SurvSetCVar; | |
| public OnPluginStart() | |
| { | |
| g_SurvSetCVar = CreateConVar("l4d_force_survivorset", "2", | |
| "Forces specified survivor set (0 - do not force, 1 - force l4d1 set, 2 - force l4d2 set (allows to use l4d2 survivors voices in l4d1 campaigns))", | |
| FCVAR_PLUGIN); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using SteamKit2; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace SteamConnection | |
| { | |
| class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Runtime.CompilerServices; | |
| using System.Threading.Tasks; | |
| public class Class1 | |
| { | |
| static Class1() | |
| { | |
| DoThing(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Reverse-engineered CTerrorPlayer::UpdateZombieFrustration(). | |
| // I can claim no copyright for this code. | |
| // This representation of code was produced by reverse engineering for interoperability. | |
| // Any resemblance to original source is completely accidental. | |
| void CTerrorPlayer::UpdateZombieFrustration() | |
| { | |
| if ( !ZombieFrustration.GetBool()) | |
| || this->GetTeamNumber() != 3 | |
| || this->GetClass() != 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Finale Can't Spawn Glitch Fix (C) 2014 Michael Busby | |
| All trademarks are property of their respective owners. | |
| This program is free software: you can redistribute it and/or modify it | |
| under the terms of the GNU General Public License as published by the | |
| Free Software Foundation, either version 3 of the License, or (at your | |
| option) any later version. | |
| This program is distributed in the hope that it will be useful, but |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying I am +prodigysim on my passcard. https://onename.com/prodigysim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const crateData = JSON.parse(fs.readFileSync('crates-neater.json', 'utf-8')); | |
| function crateWithAny(data) { | |
| const itemNames = typeof data == 'string' ? Array.from(arguments) : data; | |
| return crateData.filter(crate => itemNames.reduce((hasItem, item) => hasItem || item in crate, false)); | |
| } | |
| const l3cc = crateWithAny('Level 3 Backpack', 'Level 3 Helmet', 'Level 3 Military Vest').length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type FilterFn<T> = (item: T) => boolean; | |
| type FilterMap<T> = Record<string, FilterFn<T>>; | |
| function filterMap<T, U extends FilterMap<T>>(items: T[], filterMap: U) { | |
| const filters = new Map<string, FilterFn<T>>(); | |
| Object.keys(filterMap).forEach((key) => filters.set(key, filterMap[key])); | |
| const itemMap: Partial<Record<keyof U, T>> = {}; | |
| for (const item of items) { | |
| const matchedFilter = Array.from(filters).find(([key, filterFn]) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get the types of all properties of T: | |
| type Values<T> = T[keyof T]; |