shotline sound fx, grenade explosion fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1491 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-25 23:39:22 +00:00
parent 34400bcd3a
commit 59f821265e
4 changed files with 26 additions and 17 deletions
+9 -1
View File
@@ -542,11 +542,19 @@ void addshotline(dynent *pl, vec &from, vec &to)
float dist = to.dist(from, unitv);
unitv.div(dist);
// shotline visuals
vec o = unitv;
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);
//playsound(S_BULLETAIR, NULL, NULL, NULL),
// shotline sound fx
vec fromuv, touv, soundpos(unitv);
float fd = camera1->o.dist(from, fromuv);
float td = camera1->o.dist(to, touv);
soundpos.mul(fd/(fd+td)*dist);
soundpos.add(from);
playsound(S_BULLETAIR, NULL, NULL, &soundpos);
}