Refactoring patch by DevHC

This commit is contained in:
Thilo Schulz 2011-03-05 19:20:37 +00:00
parent 21668c0616
commit fef4d12d68
31 changed files with 60 additions and 98 deletions

View file

@ -1556,7 +1556,7 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
if (AAS_PointAreaNum(trace.endpos) == area2num)
{
//if not going through a cluster portal
numareas = AAS_TraceAreas(start, end, areas, NULL, sizeof(areas) / sizeof(int));
numareas = AAS_TraceAreas(start, end, areas, NULL, ARRAY_LEN(areas));
for (i = 0; i < numareas; i++)
if (AAS_AreaClusterPortal(areas[i]))
break;
@ -2311,7 +2311,7 @@ int AAS_Reachability_Jump(int area1num, int area2num)
//because the predicted jump could have rushed through the area
VectorMA(move.endpos, -64, dir, teststart);
teststart[2] += 1;
numareas = AAS_TraceAreas(move.endpos, teststart, areas, NULL, sizeof(areas) / sizeof(int));
numareas = AAS_TraceAreas(move.endpos, teststart, areas, NULL, ARRAY_LEN(areas));
for (j = 0; j < numareas; j++)
{
if (areas[j] == area2num)
@ -4254,7 +4254,7 @@ void AAS_Reachability_WalkOffLedge(int areanum)
break;
} //end if
//if not going through a cluster portal
numareas = AAS_TraceAreas(mid, testend, areas, NULL, sizeof(areas) / sizeof(int));
numareas = AAS_TraceAreas(mid, testend, areas, NULL, ARRAY_LEN(areas));
for (p = 0; p < numareas; p++)
if (AAS_AreaClusterPortal(areas[p]))
break;