mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Helicopter features (by anv):
- Waldo can now repair the helicopter for money - alternative fuel system - damage to helicopter can damage passengers Appropriate Data in GameDir r1897. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6695 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
// HEADROCK HAM 3.5: Add facility code for hourly update of detection levels
|
||||
#include "Facilities.h"
|
||||
#include "Food.h" // added by Flugente
|
||||
// anv: for hourly heli repair
|
||||
#include "Vehicles.h"
|
||||
#include "Map Screen Helicopter.h"
|
||||
|
||||
void HourlyQuestUpdate();
|
||||
void HourlyLarryUpdate();
|
||||
@@ -45,6 +48,12 @@ extern void PayOffSkyriderDebtIfAny( );
|
||||
void HourlyCheckIfSlayAloneSoHeCanLeave();
|
||||
#endif
|
||||
|
||||
#if (defined JA2UB)
|
||||
//no UB
|
||||
#else
|
||||
void HourlyHelicopterRepair();
|
||||
#endif
|
||||
|
||||
void UpdateRegenCounters( void );
|
||||
|
||||
void HandleMinuteUpdate()
|
||||
@@ -114,6 +123,8 @@ CHAR16 zString[128];
|
||||
|
||||
PayOffSkyriderDebtIfAny();
|
||||
|
||||
HourlyHelicopterRepair();
|
||||
|
||||
if ( GetWorldHour() % 6 == 0 ) // 4 times a day
|
||||
{
|
||||
UpdateRegenCounters();
|
||||
@@ -566,3 +577,33 @@ void HourlyCheckIfSlayAloneSoHeCanLeave()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (defined JA2UB)
|
||||
// no JA25 UB
|
||||
#else
|
||||
void HourlyHelicopterRepair()
|
||||
{
|
||||
if( gubHelicopterHoursToRepair == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
MERCPROFILESTRUCT *pMechanic;
|
||||
pMechanic = &(gMercProfiles[ WALDO ]);
|
||||
if( !pMechanic )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( !pMechanic->bLife )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( pVehicleList[ iHelicopterVehicleId ].sSectorX == gMercProfiles[ WALDO ].sSectorX && pVehicleList[ iHelicopterVehicleId ].sSectorX == gMercProfiles[ WALDO ].sSectorX )
|
||||
{
|
||||
gubHelicopterHoursToRepair--;
|
||||
}
|
||||
if( gubHelicopterHoursToRepair == 0 )
|
||||
{
|
||||
FinishHelicopterRepair();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user