fixed firetruck crash

This commit is contained in:
Nikolay Korolev 2020-02-02 15:19:19 +03:00 committed by GitHub
parent 2baacf0e9e
commit 2c0b67c92f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4328,7 +4328,7 @@ CAutomobile::RemoveBonnetInPedCollision(void)
{ {
CObject *obj; CObject *obj;
if(Damage.GetDoorStatus(DOOR_BONNET) != DOOR_STATUS_SWINGING && if(Damage.GetDoorStatus(DOOR_BONNET) == DOOR_STATUS_SWINGING &&
Doors[DOOR_BONNET].RetAngleWhenOpen()*0.4f < Doors[DOOR_BONNET].m_fAngle){ Doors[DOOR_BONNET].RetAngleWhenOpen()*0.4f < Doors[DOOR_BONNET].m_fAngle){
// BUG? why not COMPGROUP_BONNET? // BUG? why not COMPGROUP_BONNET?
obj = SpawnFlyingComponent(CAR_BONNET, COMPGROUP_DOOR); obj = SpawnFlyingComponent(CAR_BONNET, COMPGROUP_DOOR);