// These default settings are executed whenever "saved.cfg" is not available.
// Do not modify anything below, instead change settings in game, or add to autoexec.cfg

///////////////////////////////////////////////////////////////////////////////
//  Settings                                                                 //
///////////////////////////////////////////////////////////////////////////////
name "unnamed"

///////////////////////////////////////////////////////////////////////////////
//  Console                                                                  //
///////////////////////////////////////////////////////////////////////////////
miniconfilter 0x300                 // display chat and team chat in mini-console
confilter (&~ 0xFFF $miniconfilter) // don't display other player frags or mini-console stuff in console


///////////////////////////////////////////////////////////////////////////////
//  Universal Mouse Scrollwheel                                              //
///////////////////////////////////////////////////////////////////////////////
ums_modifier    = 0
ums_setmodifier = [ums_modifier = $arg1; onrelease [ums_modifier = 0]]
ums_delta       = [[ums_delta_@(? $editing "edit" "game")_@ums_modifier] $arg1]

bind "MOUSEWHEELUP"   [ums_delta  1]
bind "MOUSEWHEELDOWN" [ums_delta -1]


///////////////////////////////////////////////////////////////////////////////
//  Game Binds                                                               //
///////////////////////////////////////////////////////////////////////////////
bind "MOUSELEFT"    [shoot]
bind "MOUSERIGHT"   [dozoom]
bind "MOUSEMIDDLE"  [melee]
bind "MOUSEBACK"    [melee]
bind "MOUSEFORWARD" [melee]

// Movement
bind "W"     [forward]
bind "A"     [left]
bind "S"     [backward]
bind "D"     [right]
bind "UP"    [forward]
bind "DOWN"  [backward]
bind "RIGHT" [right]
bind "LEFT"  [left]

bind    "F6"  [toggleui "map_browser"]
bindvar "F8"  [hidehud]
bind    "F10" [toggleui "gamebind_reference"]
bind    "F11" [toggleconsole; conskip -1000]
bind    "F12" [screenshot]

bindvarquiet "PAUSE" [paused]

bind "INSERT"   [addbot]
bind "DELETE"   [delbot]
bind "PAGEUP"   [conskip 5]
bind "PAGEDOWN" [conskip -1000]

bind "BACKQUOTE" [saycommand /]
bind "SLASH"     [saycommand /]
bind "TAB"       [holdui scoreboard]
bind "LSHIFT"    [crouch]
bind "LCTRL"     [crouch]
bind "SPACE"     [jump]
bind "RETURN"    [saycommand]

bind "E" [edittoggle]
bind "F" [melee]
bind "J" [taunt]
bind "R" [dropflag]
bind "T" [saycommand]
bind "Y" [sayteamcommand]

bind    "1" [setweapon rail]
bind    "2" [setweapon pulse]
bindvar "9" [thirdperson]
bind    "0" [menu_master]

// Console scroll -or- Weapon change
ums_delta_game_0 = [if $fullconsole [conskip (* $arg1 3)] [nextweapon $arg1]]


///////////////////////////////////////////////////////////////////////////////
//  Specatator Binds                                                         //
///////////////////////////////////////////////////////////////////////////////
specbind "MOUSELEFT"   [nextfollow]
specbind "MOUSERIGHT"  [nextfollow -1]
specbind "MOUSEMIDDLE" [nextspecmode]
specbind "SPACE"       [nextspecmode]
specbind "LSHIFT"      [floatspeed 1000;onrelease [floatspeed 100]]
specbind "LCTRL"       [floatspeed 25;onrelease [floatspeed 100]]


///////////////////////////////////////////////////////////////////////////////
//  Edit Binds                                                               //
///////////////////////////////////////////////////////////////////////////////
editbind "MOUSELEFT"    [if $blendpaintmode [paintblendmap] [editdrag]]
editbind "MOUSEMIDDLE"  [selcorners]
editbind "MOUSERIGHT"   [if $blendpaintmode [rotateblendbrush] [editextend]]
editbind "MOUSEBACK"    [toggleeditmovecut]
editbind "MOUSEFORWARD" [toggleeditmovecut]

editbind    "LSHIFT" [floatspeed $editfloatspeed; onrelease [floatspeed 100]]
editbind    "COMMA"  [ums_setmodifier 9]  // vSlot: rotate
editbind    "PERIOD" [ums_setmodifier 10] // vSlot: scale
editbindmod "LCTRL"  [passthrough]
editbind    "SPACE"  [cancelsel]

editbind "DELETE" [editdel]
editbind "HOME"   [gotosel]
editbind "END"    [ums_setmodifier 16; onrelease entautoview] // Hold and scroll to goto selected entities

editbind    "1"      [ums_setmodifier 11] // Entity attribute modifier 0
editbind    "2"      [ums_setmodifier 12] // Entity attribute modifier 1
editbind    "3"      [ums_setmodifier 13] // Entity attribute modifier 2
editbind    "4"      [ums_setmodifier 14] // Entity attribute modifier 3
editbind    "5"      [ums_setmodifier 15] // Entity attribute modifier 4
editbindvar "6"      [allfaces]
editbindvar "7"      [entselsnap]
editbindvar "8"      [entediting]
editbind    "9"      [selentedit]
editbindvar "MINUS"  [outline]
editbindvar "EQUALS" [wireframe]

// Editing Menus
editbind "F1"  [menu_entity]                   // Add/Edit Entity
editbind "F2"  [toggleui "texture_browser"]    // Texture List
editbind "F3"  [toggleui "mapmodel"]           // Add Mapmodel
editbind "F4"  [toggleui "material"]           // Edit Material
editbind "F5"  [menu_savemap]                  // Savemap
editbind "F7"  [toggleui "env_settings"]       // Environment Settings
editbind "F8"  [toggleui "geo_prefab"]         // World Geometry Prefab
editbind "F9"  [toggleui "misc_editing"]       // Miscellaneous Editing
editbind "F10" [toggleui "editbind_reference"] // Default Editbind Quick Reference

// Number Keypad
editbind "KP0"         [blendpaintmode 0]  // Exit paint blendmap mode
editbind "KP1"         [blendpaintmode 1]
editbind "KP2"         [blendpaintmode 2]  // Paint
editbind "KP3"         [blendpaintmode 3]
editbind "KP4"         [blendpaintmode 4]
editbind "KP5"         [blendpaintmode 5]  // Erase
editbind "KP8"         [nextblendbrush -1] // Select brush -
editbind "KP9"         [nextblendbrush  1] // Select brush +
editbind "KP_DIVIDE"   [floatspeed  10; echo [floatspeed @floatspeed]]
editbind "KP_MULTIPLY" [floatspeed  50; echo [floatspeed @floatspeed]]
editbind "KP_MINUS"    [floatspeed 100; echo [floatspeed @floatspeed]]
editbind "KP_PLUS"     [toggleeditmovecut] // Toggle MOUSERIGHT to move selection with or without contents
editbind "KP_ENTER"    [entselect insel]   // Select entities within area selection

editbind    "B" [ums_setmodifier 6] // Change heightmap brush
editbind    "C" [editcopy]
editbind    "F" [ums_setmodifier 2] // Push face/corners selected
editbind    "G" [ums_setmodifier 1] // Grid size
editbind    "H" [if $hmapedit [editface 1 -1] [hmapedit 1]]
editbind    "I" [redo]
editbind    "K" [calclight]
editbindvar "L" [fullbright]
editbindvar "M" [showmat]
editbind    "N" [selentfindall]
editbind    "O" [ums_setmodifier 7] // vSlot: offset H
editbind    "P" [ums_setmodifier 8] // vSlot: offset V
editbind    "Q" [ums_setmodifier 3] // Push corner pointed at by cursor
editbind    "R" [ums_setmodifier 4] // Geometry rotate -or- blend brush rotate
editbind    "U" [undo; passthroughsel 0]
editbind    "V" [editpaste]
editbind    "X" [editflip]          // Geometry flip
editbind    "Y" [ums_setmodifier 5] // Change textures
editbind    "Z" [history 0]         // Repeat last saycommand

ums_delta_edit_0  = [if $fullconsole [conskip (* $arg1 3)] [if $blendpaintmode [nextblendbrush $arg1] [editfacewsel $arg1 1]]]  // Console scroll -or- Change blend brush -or- Push/pull geometry
ums_delta_edit_1  = [nodebug [gridpower (+ $arg1 $gridpower)]]                       // Grid size
ums_delta_edit_2  = [editfacewsel $arg1 0]                                           // Push face/corners selected
ums_delta_edit_3  = [editfacewsel $arg1 2]                                           // Push corner pointed at by cursor
ums_delta_edit_4  = [if $blendpaintmode [rotateblendbrush $arg1] [editrotate $arg1]] // Geometry rotate -or- blend brush rotate
ums_delta_edit_5  = [edittex $arg1]                                                  // Change textures
ums_delta_edit_6  = [selecthbrush $arg1]                                             // Change heightmap brush
ums_delta_edit_7  = [vdelta [voffset (* $arg1 $delta_multiplier2) 0]]               // vSlot: offset H
ums_delta_edit_8  = [vdelta [voffset 0 (* $arg1 $delta_multiplier2)]]               // vSlot: offset V
ums_delta_edit_9  = [vdelta [vrotate $arg1]]                                         // vSlot: rotate
ums_delta_edit_10 = [vdelta [vscale (if (< $arg1 0) 0.5 2)]]                         // vSlot: scale
ums_delta_edit_11 = [entproperty 0 (* $arg1 $delta_multiplier1)]
ums_delta_edit_12 = [entproperty 1 (* $arg1 $delta_multiplier1)]
ums_delta_edit_13 = [entproperty 2 (* $arg1 $delta_multiplier1)]
ums_delta_edit_14 = [entproperty 3 (* $arg1 $delta_multiplier1)]
ums_delta_edit_15 = [entproperty 4 (* $arg1 $delta_multiplier1)]
ums_delta_edit_16 = [entautoview $arg1]

editbind "LALT" [delta_multiplier1 = 10;onrelease [delta_multiplier1 = 1]]  // Entity attribute multiplier
editbind "RALT" [delta_multiplier2 = 32;onrelease [delta_multiplier2 = 16]] // vSlot: offset multiplier
delta_multiplier1 = 1
delta_multiplier2 = 16
