14 override int GetMeleeTargetType()
25 proto native
int CrewSize();
29 proto native
int CrewPositionIndex(
int componentIdx );
33 proto native
int CrewMemberIndex( Human player );
37 proto native Human CrewMember(
int posIdx );
40 proto
void CrewEntry(
int posIdx, out
vector pos, out
vector dir );
43 proto
void CrewEntryWS(
int posIdx, out
vector pos, out
vector dir );
46 proto
void CrewTransform(
int posIdx, out
vector mat[4] );
49 proto
void CrewTransformWS(
int posIdx, out
vector mat[4] );
52 proto native
void CrewGetIn( Human player,
int posIdx );
55 proto native Human CrewGetOut(
int posIdx );
58 proto native
void CrewDeath(
int posIdx );
70 override bool IsHealthVisible()
80 bool IsAnyCrewPresent()
82 for (
int index = 0; index < CrewSize(); ++index)
84 if (CrewMember(index) !=
null)
100 vector GetTransportCameraOffset()
107 #ifndef CFGMODS_DEFINE_TEST
108 Error(
"GetAnimInstance() not implemented");
117 #ifndef CFGMODS_DEFINE_TEST
118 Error(
"GetSeatAnimationType() not implemented");
125 #ifndef CFGMODS_DEFINE_TEST
126 Error(
"Get3rdPersonCameraType() not implemented");
135 #ifndef CFGMODS_DEFINE_TEST
144 #ifndef CFGMODS_DEFINE_TEST
153 #ifndef CFGMODS_DEFINE_TEST
162 #ifndef CFGMODS_DEFINE_TEST
172 switch (pDoorSelection)
177 case "DoorsCoDriver":
190 bool IsIgnoredObject(
Object o )
204 if (
Class.CastTo(player, o))
208 if (hcv && hcv.GetTransport() ==
this)
216 return ( ( e && (e.IsZombie() || e.IsHologram()) ) || o.CanBeSkinned() || o.IsBush() || o.IsTree() );
219 bool IsAreaAtDoorFree(
int currentSeat,
float maxAllowedObjHeight, inout
vector extents, out
vector transform[4] )
221 GetTransform(transform);
225 CrewEntry( currentSeat, crewPos, crewDir );
229 entry[0] =
vector.Up * crewDir;
230 entry[1] = entry[2] * entry[0];
233 Math3D.MatrixMultiply4( transform, entry, transform );
235 vector position = transform[3];
238 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
243 excluded.Insert(
this);
245 GetGame().IsBoxColliding(position, orientation, extents, excluded, collided);
247 orientation.RotationMatrixFromAngles(transform);
248 transform[3] = position;
250 foreach (
Object o : collided)
253 if (IsIgnoredObject(o))
257 if (o.GetCollisionBox(minmax))
264 bool IsAreaAtDoorFree(
int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
269 extents[0] = horizontalExtents;
270 extents[1] = playerHeight;
271 extents[2] = horizontalExtents;
273 return IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform );
276 Shape DebugFreeAreaAtDoor(
int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
278 int color =
ARGB(20, 0, 255, 0);
283 extents[0] = horizontalExtents;
284 extents[1] = playerHeight;
285 extents[2] = horizontalExtents;
287 if (!IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform ))
289 color =
ARGB(20, 255, 0, 0);
292 Shape shape =
Debug.DrawBox(-extents * 0.5, extents * 0.5, color);
293 shape.SetMatrix(transform);