Skip to content

Commit 420c8e0

Browse files
committed
Fix not being able to overlap bonus+main endzones
1 parent d93ed28 commit 420c8e0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

addons/sourcemod/scripting/shavit-zones.sp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4087,11 +4087,15 @@ bool InStartOrEndZone(float point1[3], float point2[3], int track, int type)
40874087

40884088
for (int i = 0; i < gI_MapZones; i++)
40894089
{
4090-
if ((gA_ZoneCache[i].iTrack == track && gA_ZoneCache[i].iType == type)
4091-
|| (gA_ZoneCache[i].iType != Zone_End && gA_ZoneCache[i].iType != Zone_Start))
4092-
{
4090+
// we only care about start/end zones
4091+
if (gA_ZoneCache[i].iType != Zone_End && gA_ZoneCache[i].iType != Zone_Start)
4092+
continue;
4093+
// we don't care about start/end zones from other tracks
4094+
if (gA_ZoneCache[i].iTrack != track)
4095+
continue;
4096+
// placing multiple overlapping startzones, or multiple overlapping endzones, is fine
4097+
if (gA_ZoneCache[i].iType == type)
40934098
continue;
4094-
}
40954099

40964100
float bmin[3], bmax[3];
40974101
BoxPointsToMinsMaxs(gV_MapZones_Visual[i][0], gV_MapZones_Visual[i][7], bmin, bmax);

0 commit comments

Comments
 (0)