diff options
Diffstat (limited to 'src/fpsgame')
| -rw-r--r-- | src/fpsgame/ai.cpp | 2 | ||||
| -rw-r--r-- | src/fpsgame/fps.cpp | 2 | ||||
| -rw-r--r-- | src/fpsgame/waypoint.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/fpsgame/ai.cpp b/src/fpsgame/ai.cpp index c57b575..0886245 100644 --- a/src/fpsgame/ai.cpp +++ b/src/fpsgame/ai.cpp @@ -18,7 +18,7 @@ namespace ai float viewdist(int x) { - return x <= 100 ? clamp((SIGHTMIN+(SIGHTMAX-SIGHTMIN))/100.f*float(x), float(SIGHTMIN), float(fog)) : 10000.0f; + return x <= 100 ? clamp((SIGHTMIN+(SIGHTMAX-SIGHTMIN))/100.f*float(x), float(SIGHTMIN), 10000.0f) : 10000.0f; } float viewfieldx(int x) diff --git a/src/fpsgame/fps.cpp b/src/fpsgame/fps.cpp index bcbad2b..da678f6 100644 --- a/src/fpsgame/fps.cpp +++ b/src/fpsgame/fps.cpp @@ -643,7 +643,7 @@ namespace game return server::modename(gamemode, NULL); } - void physicstrigger(physent *d, bool local, int floorlevel, int waterlevel, int material) + void physicstrigger(physent *d, bool local, int floorlevel, int material) { if(d->type==ENT_INANIMATE) return; if (floorlevel>0) { if(d==player1 || d->type!=ENT_PLAYER || ((fpsent *)d)->ai) msgsound(S_JUMP, d); } diff --git a/src/fpsgame/waypoint.cpp b/src/fpsgame/waypoint.cpp index 8d97782..22e48d0 100644 --- a/src/fpsgame/waypoint.cpp +++ b/src/fpsgame/waypoint.cpp @@ -11,7 +11,7 @@ namespace ai bool clipped(const vec &o) { int material = lookupmaterial(o), clipmat = material&MATF_CLIP; - return clipmat == MAT_CLIP || material&MAT_DEATH || (material&MATF_VOLUME) == MAT_LAVA; + return clipmat == MAT_CLIP || material&MAT_DEATH; } int getweight(const vec &o) @@ -25,7 +25,7 @@ namespace ai weight = int(dist/ai::JUMPMIN); pos.z -= clamp(dist-8.0f, 0.0f, pos.z); int trgmat = lookupmaterial(pos); - if(trgmat&MAT_DEATH || (trgmat&MATF_VOLUME) == MAT_LAVA) weight *= 10; + if(trgmat&MAT_DEATH) weight *= 10; } return weight; } @@ -566,7 +566,7 @@ namespace ai if(d->state != CS_ALIVE) { d->lastnode = -1; return; } bool dropping = shoulddrop(d); int mat = lookupmaterial(v); - if((mat&MATF_CLIP) == MAT_CLIP || (mat&MATF_VOLUME) == MAT_LAVA || mat&MAT_DEATH) dropping = false; + if((mat&MATF_CLIP) == MAT_CLIP || mat&MAT_DEATH) dropping = false; float dist = dropping ? WAYPOINTRADIUS : (d->ai ? WAYPOINTRADIUS : SIGHTMIN); int curnode = closestwaypoint(v, dist, false, d), prevnode = d->lastnode; if(!iswaypoint(curnode) && dropping) |
