[saco] Implement/match CVehiclePool::FUNC_1001EEB0; the sentinel stays 32-bit only while the loop exit assigns it

This commit is contained in:
ricardoofnl
2026-09-04 21:14:02 +07:00
parent ea6365cdc6
commit 80b6155fd6
2 changed files with 21 additions and 0 deletions
+19
View File
@@ -170,3 +170,22 @@ void CVehiclePool::FUNC_1001ED70()
}
//----------------------------------------------------
short CVehiclePool::FUNC_1001EEB0(int a1, VECTOR *vecOrigin, VECTOR *vecLine)
{
char colPoint[52];
DWORD dwHitEntity = 0;
ProcessLineOfSight(vecOrigin, vecLine, (VECTOR *)colPoint, &dwHitEntity, 0, 1, 0, 0, 0, 0, 0, 0);
if(!dwHitEntity) return -1;
// the sentinel has to stay on the loop exit path, folding it into the return narrows it to 16 bits
int iVehicleID;
for(int i = 1; ; i++) {
if(i > field_0) { iVehicleID = INVALID_VEHICLE_ID; break; }
if(dwHitEntity == field_4FB4[i]) { iVehicleID = i; break; }
}
return iVehicleID;
}
//----------------------------------------------------
+2
View File
@@ -55,6 +55,8 @@ public:
int FUNC_1001EC00(); // .text:1001EC00
short FUNC_1001EEB0(int a1, VECTOR *vecOrigin, VECTOR *vecLine); // .text:1001EEB0
void FUNC_1001ED70(); // .text:1001ED70
char FUNC_1001EE20(VECTOR *vecStart, VECTOR *vecEnd); // .text:1001EE20