From 567971f6d5c805cbbb8796123989a1e79a17d183 Mon Sep 17 00:00:00 2001 From: driAn Date: Thu, 3 Jan 2008 12:02:01 +0000 Subject: [PATCH] console V-key fix, vars for gfx tweaking git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1546 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/console.h | 7 +++++-- source/src/renderparticles.cpp | 13 ++++++------- source/src/weapon.cpp | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/source/src/console.h b/source/src/console.h index edfd22f2..5627cd33 100644 --- a/source/src/console.h +++ b/source/src/console.h @@ -84,8 +84,11 @@ struct textinputbuffer case SDLK_v: extern void pasteconsole(char *dst); - if(SDL_GetModState()&(KMOD_LCTRL|KMOD_RCTRL)) pasteconsole(buf); - break; + if(SDL_GetModState()&(KMOD_LCTRL|KMOD_RCTRL)) + { + pasteconsole(buf); + break; + } default: { diff --git a/source/src/renderparticles.cpp b/source/src/renderparticles.cpp index b5122c98..ea534657 100644 --- a/source/src/renderparticles.cpp +++ b/source/src/renderparticles.cpp @@ -521,12 +521,12 @@ void particle_fireball(int type, vec &o) newparticle(o, vec(0, 0, 0), (int)((parttypes[type].sz-1.0f)*100.0f), type); } -VARP(holettl, 0, 10000, 30000); +VARP(bulletholettl, 0, 10000, 30000); VARP(bulletbouncesound, 0, 1, 1); bool addbullethole(vec &from, vec &to, float radius) { - if(!holettl) return false; + if(!bulletholettl) return false; vec surface, ray(to); ray.sub(from); ray.normalize(); @@ -535,7 +535,7 @@ bool addbullethole(vec &from, vec &to, float radius) vec o(from); o.add(ray.mul(dist)); o.add(vec(surface).mul(0.005f)); - newparticle(o, surface, holettl, 7); + newparticle(o, surface, bulletholettl, 7); if(bulletbouncesound) playsound(S_BULLETBOUNCE, NULL, NULL, &o); return true; } @@ -551,13 +551,12 @@ bool addscorchmark(vec &o, float radius) return true; } -VARP(shotlines, 0, 1, 1); -VARP(shotlinettl, 0, 0, 10000); +VARP(shotlinettl, 0, 75, 10000); VARP(bulletairsound, 0, 1, 1); void addshotline(dynent *pl, vec &from, vec &to) { - if(pl == player1 || !shotlines) return; + if(pl == player1 || !shotlinettl) 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 @@ -571,7 +570,7 @@ void addshotline(dynent *pl, vec &from, vec &to) o.mul(dist/10+start).add(from); vec d = unitv; d.mul(dist/10*-(10-start-2)).add(to); - newparticle(o, d, fx ? shotlinettl : 75, 6); + newparticle(o, d, fx ? shotlinettl : min(75, shotlinettl), 6); // shotline sound fx if(!bulletairsound) return; diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 944199bb..bfb9adbd 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -451,7 +451,7 @@ VARP(gibspeed, 1, 30, 100); void addgib(playerent *d) { - if(!d) return; + if(!d || !gibttl) return; playsound(S_GIB, d); loopi(gibnum)