From 7daa68cfa98a0458664b695a5ec22b48fb66e500 Mon Sep 17 00:00:00 2001 From: driAn Date: Thu, 1 May 2008 09:34:34 +0000 Subject: [PATCH] more menu settings git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1833 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/menus_settings.cfg | 44 ++++++++++++++++++---------------- source/src/renderparticles.cpp | 9 ++++--- source/src/server.cpp | 2 +- source/src/weapon.cpp | 3 ++- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 5d2aa16d..0c56efe2 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -87,11 +87,11 @@ alias new_gfx_quality [ waterreflect 1 dynshadow 40 lighterror 1 - scorchttl 10000 - bulletholettl 10000 - bloodttl 10000 - gibttl 5000 - shotlinettl 75 + scorch 1 + bullethole 1 + blood 1 + gib 1 + shotline 1 ] [ if (= $arg1 3) [ // high fsaa 0 @@ -102,11 +102,11 @@ alias new_gfx_quality [ waterreflect 1 dynshadow 40 lighterror 4 - scorchttl 10000 - bulletholettl 10000 - bloodttl 10000 - gibttl 5000 - shotlinettl 75 + scorch 1 + bullethole 1 + blood 1 + gib 1 + shotline 1 ] [ if (= $arg1 2) [ // medium (DEFAULT) fsaa 0 @@ -117,11 +117,11 @@ alias new_gfx_quality [ waterreflect 1 dynshadow 40 lighterror 4 - scorchttl 10000 - bulletholettl 10000 - bloodttl 10000 - gibttl 5000 - shotlinettl 75 + scorch 1 + bullethole 1 + blood 1 + gib 1 + shotline 1 ] [ // low fsaa 0 minlod 25 @@ -131,11 +131,11 @@ alias new_gfx_quality [ waterreflect 0 dynshadow 0 lighterror 10 - scorchttl 0 - bulletholettl 0 - bloodttl 0 - gibttl 0 - shotlinettl 0 + scorch 0 + bullethole 0 + blood 0 + gib 0 + shotline 0 ] ] ] @@ -218,8 +218,10 @@ alias fsaa_valuemap "-1 2 4 8 16" menuitemslider "Antialiasing (FSAA): " 0 4 "(findlist $fsaa_valuemap $fsaa)" 1 "off 2 4 8 16" "fsaa (at $fsaa_valuemap $arg1)" menuitemslider "Vsync: " 0 1 "$vsync" 1 "off on" "vsync $arg1" - menuitemslider "Gamma: " 30 300 "$gamma" 5 "" "gamma $arg1" +menuitemcheckbox "Bulletholes: " "$bullethole" "bullethole $arg1" +menuitemcheckbox "Scorch: " "$scorch" "scorch $arg1" +menuitemcheckbox "Blood: " "$blood" "blood $arg1; gib $arg1" alias minlod_valuemap "25 60 100 250" menuitemslider "Minimal level of detail: " 25 250 "(findlist $minlod_valuemap $minlod)" 5 ["low" "decent" "good" "best"] "minlod (at $minlod_valuemap $arg1)" diff --git a/source/src/renderparticles.cpp b/source/src/renderparticles.cpp index f56bf5ec..81a8e5e9 100644 --- a/source/src/renderparticles.cpp +++ b/source/src/renderparticles.cpp @@ -597,12 +597,13 @@ void particle_fireball(int type, vec &o) newparticle(o, vec(0, 0, 0), (int)((parttypes[type].sz-1.0f)*100.0f), type); } +VARP(bullethole, 0, 1, 1); VARP(bulletholettl, 0, 10000, 30000); VARP(bulletbouncesoundrad, 0, 15, 1000); bool addbullethole(vec &from, vec &to, float radius, bool noisy) { - if(!bulletholettl) return false; + if(!bulletholettl || !bullethole) return false; vec surface, ray(to); ray.sub(from); ray.normalize(); @@ -616,17 +617,19 @@ bool addbullethole(vec &from, vec &to, float radius, bool noisy) return true; } +VARP(scorch, 0, 1, 1); VARP(scorchttl, 0, 10000, 30000); bool addscorchmark(vec &o, float radius) { - if(!scorchttl) return false; + if(!scorchttl || !scorch) return false; sqr *s = S((int)o.x, (int)o.y); if(s->type!=SPACE || o.z-s->floor>radius) return false; newparticle(vec(o.x, o.y, s->floor+0.005f), vec(0, 0, 1), scorchttl, 9); return true; } +VARP(shotline, 0, 1, 1); VARP(shotlinettl, 0, 75, 10000); VARP(bulletairsoundrad, 0, 15, 1000); VARP(bulletairsoundsourcerad, 0, 8, 1000); @@ -634,7 +637,7 @@ VARP(bulletairsounddestrad, 0, 8, 1000); void addshotline(dynent *pl, vec &from, vec &to) { - if(pl == player1 || !shotlinettl) return; + if(pl == player1 || !shotlinettl || !shotline) return; bool fx = shotlinettl > 0 && (player1->isspectating() || !multiplayer(false)); // allow fx only in spect mode and locally if(rnd(3) && !fx) return; // show all shotlines when fx enabled diff --git a/source/src/server.cpp b/source/src/server.cpp index 78cfeba7..71b08e30 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -1285,7 +1285,7 @@ void readscfg(char *cfg) if(++argc==4) { int numspaces; - for(numspaces = 0; argv[0][numspaces]==' '; numspaces++){} // ingore space crap + for(numspaces = 0; argv[0][numspaces]==' '; numspaces++){} // ignore space crap strcpy(c.mapname, argv[0]+numspaces); c.mode = atoi(argv[1]); c.time = atoi(argv[2]); diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 4eb84d8d..284a2822 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -302,13 +302,14 @@ void renderbounceents() } } +VARP(gib, 0, 1, 1); VARP(gibnum, 0, 6, 1000); VARP(gibttl, 0, 5000, 15000); VARP(gibspeed, 1, 30, 100); void addgib(playerent *d) { - if(!d || !gibttl) return; + if(!d || !gib || !gibttl) return; playsound(S_GIB, d); loopi(gibnum)