Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Sponsor me

Riley Labrecque rlabrecque

👋
Sponsor me
View GitHub Profile
View mpbhops.sp
/*========================================
** Multiplayer Bunnyhops: Source by DaFox & petsku
** Compatible with: Counter-Strike Source
** Thanks to Ian (Juan) Cammarata & #sourcemod
**======================================*/
#define VERSION "1.0.0.4"
#define MAX_BHOPBLOCKS 1024 //max. number of door/button based bhop blocks handled in a map
#define BLOCK_TELEPORT 0.15 //how long can players stand on the block before getting teleported
View GenData.cs
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization; //these imports are for writing Matrix objects to file, see end of program
using System.IO;
@rlabrecque
rlabrecque / KNN_Character_Recognition_Emgu_CV_3_CS
Created Dec 31, 2016
C# version of KNN_Character_Recognition taken from
View KNN_Character_Recognition_Emgu_CV_3_CS
// GenData
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization; //these imports are for writing Matrix objects to file, see end of program
using System.IO;
View UnGameEngines
UnAdventure Game Studio
UnAleph One
UnAllegro library
UnAngel2D
UnAnura
UnArdor3D
UnAxiom Engine
UnBlender
UnBuild engine
UnCafu Engine
View gist:047d0a0337ea8e93912d
It's just a simple preprocessor define for Unity itself.
Use case: If I'm building the same piece of code both in Unity and in XNA/Monogame/regular C# sometimes I want to do something different on each 'platform'.
A mediocre but to the point use case:
void f() {
#if UNITY
UnityEngine.Debug.Log("f");
#else
Console.WriteLine("f");
#endif
@rlabrecque
rlabrecque / gist:85609e968b9419da6af5
Created Aug 7, 2014
Source2's rendersystemdx11.dll Interface strings
View gist:85609e968b9419da6af5
VApplication001
VEngineCvar007
EventSystem001
TestScriptMgr001
VProcessUtils002
Physics2 Interface Old v0.5
VPhysX Interface ResourceMgr v0.1
VBaseFileSystem011
VFileSystem017
ResourceSystemTools001
View FNA Using Statement Cleanup Script.py
'''
Author: Riley Labrecque
License: Public Domain where acceptable. Where that dedication is not recognized, you are granted a perpetual, irrevocable license to copy and modify this file as you see fit.
Created for FNA.
'''
import os
g_SystemList = [
View SDL2Gamepad for Unity
using UnityEngine;
using System.Collections;
using System;
using SDL2;
public class SDL2Gamepad : MonoBehaviour {
private System.IntPtr gamecontroller = System.IntPtr.Zero;
private int m_device = 0;
private void Awake() {