Fixed a spectator bug related to doors (NiceAss)

This commit is contained in:
Bryce Hutchings 2001-11-07 06:38:13 +00:00
parent ee8f3f89e3
commit 929db5bd13

View file

@ -1107,11 +1107,13 @@ static void Touch_DoorTriggerSpectator( gentity_t *ent, gentity_t *other, trace_
VectorClear(dir);
if (fabs(other->s.origin[axis] - ent->r.absmax[axis]) <
fabs(other->s.origin[axis] - ent->r.absmin[axis])) {
origin[axis] = ent->r.absmin[axis] - 10;
// NiceAss: "- 10" changed to "- 15" to prevent jumping back and forth occasionally when moving slowly
origin[axis] = ent->r.absmin[axis] - 15;
dir[axis] = -1;
}
else {
origin[axis] = ent->r.absmax[axis] + 10;
// NiceAss: "- 10" changed to "- 15" to prevent jumping back and forth occasionally when moving slowly
origin[axis] = ent->r.absmax[axis] + 15;
dir[axis] = 1;
}
for (i = 0; i < 3; i++) {
@ -1188,8 +1190,10 @@ void Think_SpawnNewDoorTrigger( gentity_t *ent ) {
best = i;
}
}
maxs[best] += 120;
mins[best] -= 120;
// NiceAss: This affected spectators near doors (jumping too soon)
// This was expanding the bounds of the door trigger out from the door 120 units.
//maxs[best] += 120;
//mins[best] -= 120;
// create a trigger with this size
other = G_Spawn ();