int dirty_ground_unit;
public:
// constructors and serial functions
GroundUnitClass(int type);
GroundUnitClass(VU_BYTE **stream);
virtual ~GroundUnitClass();
virtual int SaveSize (void);
virtual int Save (VU_BYTE **stream);
// event Handlers
virtual VU_ERRCODE Handle(VuFullUpdateEvent *event);
// Required pure virtuals handled by GroundUnitClass
virtual MoveType GetMovementType (void);
virtual MoveType GetObjMovementType (Objective o, int n);
virtual int DetectOnMove (void);
virtual int ChooseTarget (void);
virtual CampaignTime UpdateTime (void)
{ return GROUND_UPDATE_CHECK_INTERVAL*CampaignSeconds; }
virtual int OnGround (void)
{ return TRUE; }
virtual float Vt (void)
{ return (Moving() ? 40.0F : 0.0F);}
virtual float Kias (void)
{ return (Moving() ? 40.0F : 0.0F);}
// Access functions
uchar GetOrders (void) { return orders; }
short GetDivision (void) { return division; }
void SetOrders (uchar);
void SetDivision (short);
void SetPObj (VU_ID);
void SetSObj (VU_ID);
void SetAObj (VU_ID);
// Core functions
int DetectVs (AircraftClass *ac, float *d, int *combat, int *spotted, int
*capture, int *nomove, int *estr);
int DetectVs (CampEntity e, float *d, int *combat, int *spotted, int *capture,
int *nomove, int *estr);
virtual void SetUnitOrders (uchar o)
{ orders = o; }
virtual void SetUnitDivision (short d)
{ division = d; }
void SetUnitPrimaryObj (VU_ID id)
{ pobj = id; }
void SetUnitSecondaryObj (VU_ID id)
{ sobj = id; }
void SetUnitObjective (VU_ID id)
{ aobj = id; }
virtual int GetUnitOrders (void)
{ return (int)orders; }
virtual int GetUnitDivision (void)
{ return (int)division; }
Objective GetUnitPrimaryObj (void)
{ return (Objective)vuDatabase->Find(pobj); }
Objective GetUnitSecondaryObj (void)
{ return (Objective)vuDatabase->Find(sobj); }
Objective GetUnitObjective (void)
{ return (Objective)vuDatabase->Find(aobj); }
VU_ID GetUnitPrimaryObjID (void)
{ return pobj; }
VU_ID GetUnitSecondaryObjID (void)
{ return sobj; }
VU_ID GetUnitObjectiveID (void)
{ return aobj; }
virtual int CheckForSurrender (void);
virtual int GetUnitNormalRole (void);
virtual int GetUnitCurrentRole (void);
virtual int BuildMission(void);
void MakeGndUnitDirty (Dirty_Ground_Unit bits, Dirtyness score);
void WriteDirty (unsigned char **stream);
void ReadDirty (unsigned char **stream);