mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement and match IsATrainPart(...)
This commit is contained in:
parent
6b2e018270
commit
282a3c88f6
@ -1471,6 +1471,23 @@ bool HasCollisionLoaded(VECTOR *vec)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
DWORD dwEntityModelIndex;
|
||||
|
||||
BOOL __stdcall IsATrainPart(ENTITY_TYPE *pEntity)
|
||||
{
|
||||
int nModel;
|
||||
|
||||
if(pEntity) {
|
||||
nModel = pEntity->nModelIndex;
|
||||
dwEntityModelIndex = pEntity->nModelIndex;
|
||||
if(nModel == TRAIN_FREIGHT_LOCO) return TRUE;
|
||||
if(nModel == TRAIN_FREIGHT) return TRUE;
|
||||
if(nModel == TRAIN_PASSENGER_LOCO) return TRUE;
|
||||
if(nModel == TRAIN_PASSENGER) return TRUE;
|
||||
if(nModel == TRAIN_TRAM) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
float DegToRad(float fDegrees)
|
||||
{
|
||||
|
@ -49,3 +49,4 @@ void ReplaceBuildingModel(ENTITY_TYPE *pEntity, int iModelID);
|
||||
int GetInvalidModelInfoCount();
|
||||
|
||||
bool HasCollisionLoaded(VECTOR *vec);
|
||||
BOOL __stdcall IsATrainPart(ENTITY_TYPE *pEntity);
|
||||
|
Loading…
Reference in New Issue
Block a user