New Feature: Allow driving vehicles in tactical (by anv)

- To control vehicle, click on it or on the steering wheel in team panel under driver's portrait.
- Vehicles have two gears - slow drive and fast drive, switchable just like walking and running ('S', 'R', double-click).
- Vehicles working: Ice Cream Van, Hummer, Jeep, El Dorado and, potentially, tanks.
- Passengers can be selected and ordered to open fire from the inside
- You can also open inventory screen for passengers, pass or throw items, etc.

Normally vehicle is treated as any other merc and has its own APs. It has obvious disadvantages - it's possible to drive in the middle of the enemy group using vehicle's 100AP,
and then use all your mercs inside vehicle with their still full APs to kill everything that moves at point blank range - with even the driver participating!
- To prevent that you can set Tactical Gameplay Settings > AP_SHARED_AMONG_PASSENGERS_AND_VEHICLE_MODE with following calculation methods

more infos: http://www.bears-pit.com/board/ubbthreads.php/topics/332208/1.html


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7193 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-05-06 08:46:26 +00:00
parent 0e1670bf21
commit fe995dc2f3
15 changed files with 279 additions and 54 deletions
+20 -2
View File
@@ -33,6 +33,24 @@ typedef struct
} NEW_CAR;
typedef struct
{
UINT8 ubSeatIndex; // index inside a vehicle (corresponding to .pPassengers[counter])
CHAR16 zSeatName[16]; // name (to display on entering menu and on team panel)
BOOLEAN fDriver; // seat has to be taken to steer the vehicle
BOOLEAN fView; // can look out of vehicle
BOOLEAN fDriveBy; // can shoot from this seat
BOOLEAN fSeatBelt; // for collisions
BOOLEAN fHidden; // merc on this seat is invisible from outside - spy as a driver smuggling in others?
UINT8 ubRotation; // rotation in relation to vehicle
UINT8 ubTunnelVision; // tunnel vision (small windows, etc.)
UINT8 ubProtection; // influence probability vehicle will be hit instead of passenger
UINT8 ubCompartment; // passenger can switch to another seat in the same compartment without exiting vehicle
UINT8 ubStructureLink; // link to physical part of structure (for hit calculations)
UINT32 usMountedGun; // passenger on this seat will use this gun instead of his own, link to Items.xml
} VEHICLE_SEAT;
extern NEW_CAR gNewVehicle[NUM_PROFILES];
extern BOOLEAN LoadNewVehiclesToSaveGameFile( HWFILE hFile );
@@ -313,7 +331,7 @@ BOOLEAN AnyAccessibleVehiclesInSoldiersSector( SOLDIERTYPE *pSoldier );
BOOLEAN IsThisVehicleAccessibleToSoldier( SOLDIERTYPE *pSoldier, INT32 iId );
// add soldier to Vehicle
BOOLEAN AddSoldierToVehicle( SOLDIERTYPE *pSoldier, INT32 iId );
BOOLEAN AddSoldierToVehicle( SOLDIERTYPE *pSoldier, INT32 iId, BOOLEAN fSpecificSeat = FALSE, UINT8 ubSeatIndex = 0 );
// remove soldier from vehicle
BOOLEAN RemoveSoldierFromVehicle( SOLDIERTYPE *pSoldier, INT32 iId );
@@ -369,7 +387,7 @@ INT32 GetNumberInVehicle( INT32 iId );
// grab # in vehicle skipping EPCs (who aren't allowed to drive :-)
INT32 GetNumberOfNonEPCsInVehicle( INT32 iId );
BOOLEAN EnterVehicle( SOLDIERTYPE *pVehicle, SOLDIERTYPE *pSoldier );
BOOLEAN EnterVehicle( SOLDIERTYPE *pVehicle, SOLDIERTYPE *pSoldier, BOOLEAN fSpecificSeat = FALSE, UINT8 ubSeatIndex = 0 );
SOLDIERTYPE *GetDriver( INT32 iID );