more CVehicle

This commit is contained in:
aap 2019-07-09 23:49:44 +02:00
parent a65dd41da7
commit 702cd00765
10 changed files with 278 additions and 30 deletions

View file

@ -158,8 +158,12 @@ void
FixCar(void)
{
CVehicle *veh = FindPlayerVehicle();
if(veh == nil || !veh->IsCar())
if(veh == nil)
return;
veh->m_fHealth = 1000.0f;
if(!veh->IsCar())
return;
((CAutomobile*)veh)->Damage.SetEngineStatus(0);
((CAutomobile*)veh)->Fix();
}