Files
source/Tactical/Soldier macros.h
T
Wanne fe995dc2f3 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
2014-05-06 08:46:26 +00:00

39 lines
2.1 KiB
C

#ifndef SOLDIER_MACROS_H
#define SOLDIER_MACROS_H
// MACROS FOR EASIER SOLDIER CONTROL
#include "teamturns.h"
#include "soldier profile.h"
#include "assignments.h"
#include "Animation Data.h"
// MACROS
#define RPC_RECRUITED( p ) ( ( p->ubProfile == NO_PROFILE ) ? FALSE : ( gMercProfiles[ p->ubProfile ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED ) )
#define AM_AN_EPC( p ) ( ( p->ubProfile == NO_PROFILE ) ? FALSE : ( gMercProfiles[ p->ubProfile ].ubMiscFlags & PROFILE_MISC_FLAG_EPCACTIVE ) )
#define AM_A_ROBOT( p ) ( ( p->ubProfile == NO_PROFILE ) ? FALSE : ( gMercProfiles[ p->ubProfile ].ubBodyType == ROBOTNOWEAPON ) )
#define OK_ENEMY_MERC( p ) ( !p->aiData.bNeutral && (p->bSide != gbPlayerNum ) && p->stats.bLife >= OKLIFE && (p->bTeam < 5 ))
// Checks if our guy can be controllable .... checks bInSector, team, on duty, etc...
//#define OK_CONTROLLABLE_MERC( p ) ( p->stats.bLife >= OKLIFE && p->bActive && p->bInSector && p->bTeam == gbPlayerNum && p->bAssignment < ON_DUTY )
#define OK_CONTROLLABLE_MERC( p ) ( p->stats.bLife >= OKLIFE && p->bActive && p->bInSector && p->bTeam == gbPlayerNum && ( p->bAssignment < ON_DUTY || p->bAssignment == VEHICLE ) )
// Checks if our guy can be controllable .... checks bInSector, team, on duty, etc...
#define OK_INSECTOR_MERC( p ) ( p->stats.bLife >= OKLIFE && p->bActive && p->bInSector && p->bTeam == gbPlayerNum && p->bAssignment < ON_DUTY )
// Checks if our guy is controllable but doesn't care about current assignment
#define OK_CONTROL_MERC( p ) ( p->stats.bLife >= OKLIFE && p->bActive && p->bInSector && p->bTeam == gbPlayerNum )
// Checkf if our guy can be selected and is not in a position where our team has an interupt and he does not have one...
#define OK_INTERRUPT_MERC( p ) ( ( INTERRUPT_QUEUED != 0 ) ? ( ( p->aiData.bMoved ) ? FALSE : TRUE ) : TRUE )
#define CREATURE_OR_BLOODCAT( p ) ( (p->flags.uiStatusFlags & SOLDIER_MONSTER) || p->ubBodyType == BLOODCAT )
#define TANK( p ) (p->ubBodyType == TANK_NE || p->ubBodyType == TANK_NW )
#define OK_ENTERABLE_VEHICLE( p ) ( ( p->flags.uiStatusFlags & SOLDIER_VEHICLE ) && !TANK( p ) && p->stats.bLife >= OKLIFE )
#endif