Skip to content

Instantly share code, notes, and snippets.

@GettingWhiter
GettingWhiter / input.lua
Last active April 17, 2024 16:01 — forked from ikt32/input.lua
BeamNG Steering Assist (Updated with v0.32 or 24/04/17)
-- This Source Code Form is subject to the terms of the bCDDL, v. 1.1. If a copy of the bCDDL
-- was not distributed with this file, You can obtain one at http://beamng.com/bCDDL-1.1.txt
-- Modified by E66666666, mihaits & GettingWhiter. (lines 638 - 692)
local understeerAssistedSurfaces = {METAL = 1, PLASTIC = 1, RUBBER = 1, GLASS = 1, WOOD = 1, ASPHALT = 1, ROCK = 1, RUMBLE_STRIP = 1, COBBLESTONE = 1} -- taken from game\lua\common\particles.json
local M = {}
M.keys = {} -- Backwards compatibility
local MT = {} -- metatable
@t-mat
t-mat / dinput8_joystick.cpp
Created November 24, 2011 12:52
DirectInput Joystick class
#include <windows.h>
#include <stdio.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
class DiJoyStick {
public: