diff --git a/source/src/bot/bot_waypoint.cpp b/source/src/bot/bot_waypoint.cpp index 1d1670b8..41490679 100644 --- a/source/src/bot/bot_waypoint.cpp +++ b/source/src/bot/bot_waypoint.cpp @@ -623,6 +623,8 @@ void CWaypointClass::Think() void CWaypointClass::DrawNearWaypoints() { + glDisable(GL_CULL_FACE); + TLinkedList::node_s *pNode; node_s *pNearest = NULL; short i, j, MinI, MaxI, MinJ, MaxJ, Offset = (short)ceilf(15.0f / MAX_MAP_GRIDS); @@ -765,7 +767,9 @@ void CWaypointClass::DrawNearWaypoints() } } } - + + glEnable(GL_CULL_FACE); + if (intermission) return; /*for(int i=0;io) <= bulletbouncesoundrad) playsound(S_BULLETBOUNCE, NULL, NULL, &o); return true; } @@ -558,7 +558,9 @@ bool addscorchmark(vec &o, float radius) } VARP(shotlinettl, 0, 75, 10000); -VARP(bulletairsound, 0, 1, 1); +VARP(bulletairsoundrad, 0, 15, 1000); +VARP(bulletairsoundsourcerad, 0, 8, 1000); +VARP(bulletairsounddestrad, 0, 8, 1000); void addshotline(dynent *pl, vec &from, vec &to) { @@ -579,14 +581,15 @@ void addshotline(dynent *pl, vec &from, vec &to) newparticle(o, d, fx ? shotlinettl : min(75, shotlinettl), 6); // shotline sound fx - if(!bulletairsound) return; + if(!bulletairsoundrad) return; vec fromuv, touv; float fd = camera1->o.dist(from, fromuv); float td = camera1->o.dist(to, touv); - if(fd < 8.0f || td < 8.0f) return; // ignore near shots + if(fd <= (float)bulletairsoundsourcerad || td <= (float)bulletairsounddestrad) return; // ignore nearly fired/detonated shots vec soundpos(unitv); soundpos.mul(fd/(fd+td)*dist); soundpos.add(from); + if(soundpos.dist(camera1->o) > bulletairsoundrad) return; // outside player radius playsound(S_BULLETAIR, NULL, NULL, &soundpos); -} +}