mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 19:53:04 +08:00
[saco] Implement/match CVehiclePool::FUNC_1001EEB0; the sentinel stays 32-bit only while the loop exit assigns it
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user