mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Streamlined vehicle controls - no more selecting driver and vehicle separately, switching displayed APs and other esoteric activities. To move vehicle just select its driver and you're good to go. If you click on vehicle in tactical, also its driver will be selected automatically. Besides driving car, driver can perform other actions normally. - Vehicle's APs, health and fuel are displayed on the steering wheel - thanks to Buggler for idea. Vehicle APs are treated as a resource (so if car changes driver mid-turn, it won't go any further than it would). - Added option Tactical Interface Settings > ADD_PASSENGER_TO_ANY_SQUAD. If you order passenger to exit vehicle by clicking on the seat belt, he'll be added to new squad, so if you ordered six passengers to exit one by one, you'd end up with six new squads. With ADD_PASSENGER_TO_ANY_SQUAD = TRUE, passenger will be added to any existing squad with empty slot if possible. - Added option Tactical Interface Settings > PASSENGER_LEAVING_SWITCH_TO_NEW_SQUAD. If you order passenger to exit vehicle by clicking on the seat belt, by default you get switched to his new squad. With PASSENGER_LEAVING_SWITCH_TO_NEW_SQUAD = FALSE you'll switch only if exiting passenger is the selected one. - Cosmetic fix: changed display above vehicle from "*Merc's name* (VEHICLE)" to "*Merc's name* (*Vehicle's name*)" and colour from yellow to white (since mercs in vehicle are controllable and yellow is reserved for mercs on assignments). - Fixed passengers rotation. Again. - Fixed vehicles getting "tired" - lowered APs due to fuel below max. They can move the same as long as they have any fuel. - Fixed unrelated bug: clicking on any empty slot in team panel would select merc with id 0. - Fixed unrelated bug: switching to squad with less mercs would cause team panel to still show skill tooltips for mercs from previous squad on empty slots. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7204 3b4a5df2-a311-0410-b5c6-a8a6f20db521
64 lines
2.9 KiB
C
64 lines
2.9 KiB
C
#ifndef _SOLDIER_ADD_H
|
|
#define _SOLDIER_ADD_H
|
|
|
|
#include "Soldier Control.h"
|
|
|
|
|
|
// Finds a gridno given a sweet spot
|
|
// Returns a good direction too!
|
|
INT32 FindGridNoFromSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection );
|
|
|
|
// Ensures a good path.....
|
|
INT32 FindGridNoFromSweetSpotThroughPeople( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection );
|
|
|
|
// Returns a good sweetspot but not the swetspot!
|
|
INT32 FindGridNoFromSweetSpotExcludingSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection );
|
|
|
|
INT32 FindGridNoFromSweetSpotExcludingSweetSpotInQuardent( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection, INT8 ubQuardentDir );
|
|
|
|
// Finds a gridno near a sweetspot but a random one!
|
|
INT32 FindRandomGridNoFromSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection );
|
|
|
|
// Finds a sweetspot but excluding this one!
|
|
INT32 FindRandomGridNoFromSweetSpotExcludingSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection );
|
|
|
|
|
|
// Adds a soldier ( already created in mercptrs[] array )!
|
|
// Finds a good placement based on data in the loaded sector and if they are enemy's or not, etc...
|
|
BOOLEAN AddSoldierToSector( UINT8 ubID );
|
|
|
|
BOOLEAN AddSoldierToSectorNoCalculateDirection( UINT8 ubID );
|
|
|
|
BOOLEAN AddSoldierToSectorNoCalculateDirectionUseAnimation( UINT8 ubID, UINT16 usAnimState, UINT16 usAnimCode );
|
|
|
|
// IsMercOnTeam() checks to see if the passed in Merc Profile ID is currently on the player's team
|
|
BOOLEAN IsMercOnTeam(UINT8 ubMercID);
|
|
// requires non-intransit assignment, too
|
|
BOOLEAN IsMercOnTeamAndInOmertaAlready(UINT8 ubMercID);
|
|
// ATE: Added for contract renewals
|
|
BOOLEAN IsMercOnTeamAndAlive(UINT8 ubMercID);
|
|
// ATE: Added for contract renewals
|
|
BOOLEAN IsMercOnTeamAndInOmertaAlreadyAndAlive(UINT8 ubMercID);
|
|
|
|
|
|
|
|
// GetSoldierIDFromMercID() Gets the Soldier ID from the Merc Profile ID, else returns -1
|
|
INT16 GetSoldierIDFromMercID(UINT8 ubMercID);
|
|
|
|
INT32 FindGridNoFromSweetSpotWithStructData( SOLDIERTYPE *pSoldier, UINT16 usAnimState, INT32 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection, BOOLEAN fClosestToMerc );
|
|
|
|
/*
|
|
void SoldierInSectorSleep( SOLDIERTYPE *pSoldier, INT16 sGridNo );
|
|
*/
|
|
|
|
INT32 FindGridNoFromSweetSpotWithStructDataFromSoldier( SOLDIERTYPE *pSoldier, UINT16 usAnimState, INT8 ubRadius, UINT8 *pubDirection, BOOLEAN fClosestToMerc, SOLDIERTYPE *pSrcSoldier, BOOLEAN fAllowSoldierCurrentGrid = FALSE );
|
|
|
|
void SoldierInSectorPatient( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
|
void SoldierInSectorDoctor( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
|
void SoldierInSectorRepair( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
|
|
|
BOOLEAN CanSoldierReachGridNoInGivenTileLimit( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 sMaxTiles, INT8 bLevel );
|
|
|
|
|
|
#endif
|