mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-23 02:42:38 +01:00
- improve and fix refactoring error in RoadInCell
This commit is contained in:
parent
c553893a21
commit
922329891d
@ -517,20 +517,14 @@ int RoadInCell(VECTOR *pos)
|
||||
plane = FindRoadInBSP((_sdNode *)((int)buffer + (*check & 0x3fff) * sizeof(_sdNode) + buffer[3]), (_sdPlane *)((int)buffer + buffer[1]));
|
||||
|
||||
if (plane != NULL)
|
||||
{
|
||||
pos->vy = sdHeightOnPlane(pos, plane) + 256;
|
||||
return plane->surface - 32;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane = (_sdPlane *)((int)buffer + buffer[1]) + *check;
|
||||
|
||||
if (plane->surface > 31)
|
||||
{
|
||||
pos->vy = sdHeightOnPlane(pos, plane) + 256;
|
||||
return plane->surface - 32;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
check += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user