diff --git a/config/autoexec.cfg b/config/autoexec.cfg deleted file mode 100755 index 83a8cbc9..00000000 --- a/config/autoexec.cfg +++ /dev/null @@ -1,136 +0,0 @@ -// put all your personal settings in this file, -// and all your keybindings that are different from the default (see keymap.cfg) - -name "unarmed" // change! -team "cuber" - -skin 0 // player skin - -crosshairsize 15 - -invmouse 0 // 1 for flightsim mode -sensitivity 25 -sensitivityscale 10 - -fov 100 - -alias maxmusicvol 0 // set higher if you want (max 255) -soundvol 150 - -fpsrange 30 40 // *don't modify* unless you understand it fully - // on slow machines, try setting to 20 25 - // on fast machines, don't touch - -minlod 100 // on slow machines, try as low as 25 (bad visuals) - -dynlight 16 // set 0 if it slows you down - -gamma 100 // set to your liking, 100 = default - -hidestats 1 - -bind F6 showmip -bind F5 toggleocull -bind F11 toggleconsole - -bind F8 "savegame quicksave" -bind F9 "loadgame quicksave" - -// example WASD - -bind W forward -bind A left -bind S backward -bind D right - -hudgun 1 -maxroll 0 -lighterror 4 //change to 8 if you experience low fps - - -// below is a fun new way of editing, with all using the mousewheel -// try it out :) - -alias modifier 0 -alias domodifier [ alias modifier $arg1; onrelease [ alias modifier 0 ] ] - -bind Q [ domodifier 1 ] -bind Z [ domodifier 2 ] -bind X [ domodifier 3 ] - -alias universaldelta [ - if $editing [ alias s "edit" ] [ alias s "game" ] - concatword delta _ $s _ $modifier - s -] - -bind MOUSE4 [ universaldelta 1 ] -bind MOUSE5 [ universaldelta -1 ] - -alias primary [ weapon 0 ] -alias secondary [ weapon 1 ] -alias melee [ weapon 2 ] -alias grenade [ weapon 3 ] - -bind 1 primary -bind 2 secondary -bind 3 melee -bind 4 grenade - -bind R reload - - -bind mouse2 [ altattack ] - - -alias delta_edit_0 [ editheight $flrceil $arg1 ] -alias delta_edit_1 [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ] -alias delta_edit_2 [ edittex $flrceil $arg1 ] -alias delta_edit_3 [ edittex (+ $flrceil 1) $arg1 ] -alias delta_edit_4 [ equalize $flrceil ] -alias delta_edit_5 [ entproperty 0 $arg1 ] // and the others - - -alias delta_game_0 [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ] - - - -alias delta_game_0 [ if (= $arg1 1) [ primary ] [ secondary ] ] -bind lshift "grenade" -bind lalt "melee" - - -bind f12 screenshot - -alias tdm [ mode 0; map $arg1 ] -alias ts [ mode 4; map $arg1 ] -alias ctf [ mode 5; map $arg1 ] -alias dm [ mode 2; map $arg1 ] -alias ffa [ mode 2; map $arg1 ] -alias lms [ mode 3; map $arg1 ] -alias pf [ mode 6; map $arg1 ] -alias lss [ mode 9; map $arg1 ] - - -music ac.ogg -musicvol $maxmusicvol - -alias fade [ // 0=in, 1=out - alias stepsize 5 - alias numsteps (div $maxmusicvol $stepsize) - loop (+ $numsteps 1) [ - alias curvol (* $i $stepsize) - if (= $arg1 1) [ alias curvol (- $maxmusicvol $curvol) ] - concat musicvol ($curvol) - sleep (* $i 100) $s - ] -] - -alias start_intermission [ - fade 0 - sleep 10000 [ fade 1 ] -] - -// play once (1:40) -sleep 100000 [ fade 1 ] - diff --git a/config/autoexec.cfg.default b/config/defaults.cfg similarity index 74% rename from config/autoexec.cfg.default rename to config/defaults.cfg index 776edf64..4a320e91 100644 --- a/config/autoexec.cfg.default +++ b/config/defaults.cfg @@ -3,29 +3,11 @@ name "unarmed" // change! -invmouse 0 // 1 for flightsim mode -sensitivity 30 -sensitivityscale 10 - -fov 100 - loadcrosshair default.png // choose another crosshair, see packages/misc/crosshairs/ -crosshairsize 15 skin 0 // change your look alias maxmusicvol 120 // set higher if you want (max 255) -soundvol 150 - -fpsrange 30 40 // *don't modify* unless you understand it fully - // on slow machines, try setting to 20 25 - // on fast machines, don't touch - -minlod 100 // on slow machines, try as low as 25 (bad visuals) - -dynlight 16 // set 0 if it slows you down - -gamma 100 // set to your liking, 100 = default bind F6 showmip bind F5 toggleocull @@ -71,12 +53,6 @@ bind mouse2 [ ] -hudgun 1 -maxroll 0 -lighterror 4 //change to 8 or higher if you experience low fps -particlesize 100 -hidestats 1 - alias tdm [ mode 0; map $arg1 ] alias ts [ mode 4; map $arg1 ] alias ctf [ mode 5; map $arg1 ] @@ -89,29 +65,6 @@ alias insta [ mode 10; map $arg1 ] alias osok [ mode 10; map $arg1 ] alias tosok [ mode 11; map $arg1 ] -music ac.ogg -musicvol $maxmusicvol - -alias fade [ // 0=in, 1=out - alias stepsize 5 - alias numsteps (div $maxmusicvol $stepsize) - loop (+ $numsteps 1) [ - alias curvol (* $i $stepsize) - if (= $arg1 1) [ alias curvol (- $maxmusicvol $curvol) ] - concat musicvol ($curvol) - sleep (* $i 100) $s - ] -] - -alias start_intermission [ - fade 0 - sleep 10000 [ fade 1 ] -] - -// play once (1:40) -sleep 100000 [ fade 1 ] - - //--------------------- editing ------------------------------- // below is a fun new way of editing, with all using the mousewheel @@ -133,7 +86,6 @@ alias universaldelta [ bind MOUSE4 [ universaldelta 1 ] bind MOUSE5 [ universaldelta -1 ] - alias delta_edit_0 [ editheight $flrceil $arg1 ] alias delta_edit_1 [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ] alias delta_edit_2 [ edittex $flrceil $arg1 ] diff --git a/config/servers.cfg b/config/servers.cfg deleted file mode 100755 index 019008bc..00000000 --- a/config/servers.cfg +++ /dev/null @@ -1,7 +0,0 @@ -// servers connected to are added here automatically - -addserver 84.227.199.36 -addserver 213.39.162.207 -addserver localhost -addserver irc.gamesurge.net -addserver drian diff --git a/config/sounds.cfg b/config/sounds.cfg index 2eda0d50..c6274a02 100755 --- a/config/sounds.cfg +++ b/config/sounds.cfg @@ -41,3 +41,26 @@ registersound "weapon/pistol_akreload" // S_RAKIMBO registersound "misc/change_gun" // S_GUNCHANGE registersound "player/gib" // S_GIB +alias fade [ // 0=in, 1=out + alias stepsize 5 + alias numsteps (div $maxmusicvol $stepsize) + loop (+ $numsteps 1) [ + alias curvol (* $i $stepsize) + if (= $arg1 1) [ alias curvol (- $maxmusicvol $curvol) ] + concat musicvol ($curvol) + sleep (* $i 100) $s + ] +] + +alias start_intermission [ + fade 0 + sleep 10000 [ fade 1 ] +] + +alias start_game [ + // play once (1:40) + music ac.ogg + musicvol $maxmusicvol + sleep 100000 [ fade 1 ] +] + diff --git a/source/src/command.cpp b/source/src/command.cpp index dc87d6dd..98e5ac81 100644 --- a/source/src/command.cpp +++ b/source/src/command.cpp @@ -30,7 +30,7 @@ void alias(char *name, char *action) if(!b) { name = newstring(name); - ident b = { ID_ALIAS, name, 0, 0, 0, 0, 0, newstring(action), 0, true }; + ident b = { ID_ALIAS, name, 0, 0, 0, 0, 0, newstring(action), 0, persistidents }; idents->access(name, &b); } else if(b->type==ID_ALIAS) @@ -338,7 +338,7 @@ void writecfg() FILE *f = fopen("config/saved.cfg", "w"); if(!f) return; fprintf(f, "// automatically written on exit, DO NOT MODIFY\n// delete this file to have defaults.cfg overwrite these settings\n// modify settings in game, or put settings in autoexec.cfg to override anything\n\n"); - fprintf(f, "name %s\nteam %s\nskin %d\n", player1->name, player1->team, player1->skin); + fprintf(f, "name %s\nteam %s\nskin %d\n", player1->name, player1->team, player1->nextskin); fprintf(f, "loadcrosshair %s\n", crosshair->name+strlen("packages/misc/crosshairs/")); extern int lowfps, highfps; fprintf(f, "fpsrange %d %d\n", lowfps, highfps); diff --git a/source/src/main.cpp b/source/src/main.cpp index 3c6ad5cd..d2cd20cd 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -183,7 +183,7 @@ void limitfps(int &millis, int curmillis) }; }; -int lowfps, highfps; +int lowfps = 30, highfps = 40; void fpsrange(int low, int high) { @@ -306,7 +306,6 @@ int main(int argc, char **argv) newmenu("kick player"); newmenu("ban player"); - extern bool persistidents; persistidents = false; exec("config/keymap.cfg"); exec("config/menus.cfg"); diff --git a/source/src/protos.h b/source/src/protos.h index b2d5e76a..ae712bb7 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -1,6 +1,7 @@ // protos for ALL external functions in cube... // command +extern bool persistidents; extern int variable(char *name, int min, int cur, int max, int *storage, void (*fun)(), bool persist); extern void setvar(char *name, int i); extern int getvar(char *name); diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 91c1fb04..2453d44d 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -300,7 +300,7 @@ void transplayer() glTranslated(-camera1->o.x, -camera1->o.z, -camera1->o.y); }; -VARP(fov, 90, 105, 120); +VARP(fov, 90, 100, 120); int xtraverts; diff --git a/source/src/sound.cpp b/source/src/sound.cpp index fa085f38..0c864ad8 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -6,7 +6,7 @@ #define USE_MIXER //#endif -VARP(soundvol, 0, 255, 255); +VARP(soundvol, 0, 150, 255); bool nosound = true; #define MAXCHAN 32 diff --git a/source/src/worldlight.cpp b/source/src/worldlight.cpp index a47bf57a..089e022f 100644 --- a/source/src/worldlight.cpp +++ b/source/src/worldlight.cpp @@ -157,7 +157,7 @@ void calclight() setvar("fullbright", 0); }; -VAR(dynlight, 0, 16, 32); +VARP(dynlight, 0, 16, 32); vector dlights;