9 class ObjectSnapCallback
87 proto native
void AddProxyPhysics(
string proxySelectionName);
89 proto native
void RemoveProxyPhysics(
string proxySelectionName);
98 proto native
bool GetLODS(notnull out
array<LOD> lods);
101 proto native owned
string GetLODName(
LOD lod);
103 proto native
vector GetBoundingCenter();
106 LOD GetLODByName(
string name )
111 for (
int i = 0; i < lods.Count(); ++i )
113 string lod_name = GetLODName( lods.Get( i ) );
116 if ( lod_name ==
name )
118 return lods.Get( i );
144 void Explode(
int damageType,
string ammoType =
"")
147 ammoType = ConfigGetString(
"ammoType");
150 ammoType =
"Dummy_Heavy";
155 DamageSystem.ExplosionDamage(
EntityAI.Cast(
this),
null, ammoType,
GetPosition(), damageType);
159 void SynchExplosion()
161 if (
GetGame().IsDedicatedServer() )
163 Param1<EntityAI> p =
new Param1<EntityAI>(
null);
164 GetGame().RPCSingleParam(
this,
ERPCs.RPC_EXPLODE_EVENT, p,
true);
166 else if ( !
GetGame().IsMultiplayer() )
173 void OnExplodeClient()
175 string ammoType = ConfigGetString(
"ammoType");
178 ammoType =
"Dummy_Heavy";
192 proto native owned
string GetActionComponentName(
int componentIndex,
string geometry =
"");
195 proto native owned
vector GetActionComponentPosition(
int componentIndex,
string geometry =
"");
198 proto native owned
int GetActionComponentNameList(
int componentIndex,
TStringArray nameList,
string geometry =
"");
201 proto native
bool IsActionComponentPartOfSelection(
int componentIndex,
string selectionName,
string geometry =
"");
204 proto
void GetActionComponentsForSelectionName(
int level,
string selectionName,
TIntArray componentIndices);
207 proto
vector GetActionComponentCenter(
int level,
int componentIndex);
210 proto
vector GetActionComponentCenterOOB(
int level,
int componentIndex);
213 proto
void GetActionComponentMinMax(
int level,
int componentIndex, out
vector min, out
vector max);
216 proto native
bool ToDelete();
224 proto native
int GetGeometryLevel();
225 proto native
int GetFireGeometryLevel();
226 proto native
int GetViewGeometryLevel();
227 proto native
int GetMemoryLevel();
230 proto
bool ToBonePivot(out
int pivot,
int level,
int bone);
232 proto
bool FromBonePivot(
int pivot, out
int level, out
int bone);
236 proto
int GetBonePivot(
int level,
int component);
239 proto native
void GetBonePivotsForAnimationSource(
int level,
string animationSource, out
TIntArray pivots);
242 proto native
vector GetBonePositionLS(
int pivot);
243 proto native
vector GetBonePositionMS(
int pivot);
244 proto native
vector GetBonePositionWS(
int pivot);
247 proto native
void GetBoneRotationLS(
int pivot, out
float quaternion[4]);
248 proto native
void GetBoneRotationMS(
int pivot, out
float quaternion[4]);
249 proto native
void GetBoneRotationWS(
int pivot, out
float quaternion[4]);
252 proto native
void GetBoneTransformLS(
int pivot, out
vector transform[4]);
253 proto native
void GetBoneTransformMS(
int pivot, out
vector transform[4]);
254 proto native
void GetBoneTransformWS(
int pivot, out
vector transform[4]);
264 #ifdef DIAG_DEVELOPER
271 GetTightlyPackedCorners(axis, corners);
297 proto native
vector GetWorldPosition();
305 proto native
void PlaceOnSurface();
317 proto native
void SetOrientation(
vector vOrientation);
320 proto native
vector GetDirection();
330 proto native
vector GetDirectionUp();
333 proto native
vector GetDirectionAside();
344 proto native
vector GetModelSpeed();
347 proto native
bool CanAffectPathgraph();
350 proto native
void SetAffectPathgraph(
bool fromConfig,
bool affect);
364 proto
float ClippingInfo(out
vector minMax[2]);
376 proto native
bool GetCollisionBox(out
vector minMax[2]);
382 proto native
float GetCollisionRadius();
385 proto native
float GetDamage();
388 proto native
void GetSelectionList(out
TStringArray selectionList);
391 float GetSurfaceNoise()
394 return GetGame().SurfaceGetNoiseMultiplier(NULL, position, -1);
398 string GetSurfaceType()
403 GetGame().SurfaceUnderObject(
this, surface_type,liquid_type);
411 bool HasSelection(
string selection )
414 GetSelectionList( selections );
416 for (
int i = 0; i < selections.Count(); ++i )
418 if ( selections.Get( i ) == selection )
428 bool HasAnimation(
string anim_name )
430 string cfg_path_vehicles =
"CfgVehicles " +
GetType() +
" ";
431 if (
GetGame().ConfigIsExisting (cfg_path_vehicles) &&
GetGame().ConfigIsExisting (cfg_path_vehicles +
"AnimationSources " + anim_name) )
436 string cfg_path_weapons =
"CfgWeapons " +
GetType() +
" ";
437 if (
GetGame().ConfigIsExisting (cfg_path_weapons) &&
GetGame().ConfigIsExisting (cfg_path_weapons +
"AnimationSources " + anim_name) )
442 string cfg_path_magazines =
"CfgMagazines " +
GetType() +
" ";
443 if (
GetGame().ConfigIsExisting (cfg_path_magazines) &&
GetGame().ConfigIsExisting (cfg_path_magazines +
"AnimationSources " + anim_name) )
457 proto native
int GetMemoryPointIndex(
string memoryPointName);
458 proto native
vector GetMemoryPointPos(
string memoryPointName);
459 proto native
vector GetMemoryPointPosByIndex(
int pointIndex);
460 proto native
bool MemoryPointExists(
string memoryPoint);
462 proto native
void CreateDynamicPhysics(
int interactionLayers);
463 proto native
void EnableDynamicCCD(
bool state);
464 proto native
void SetDynamicPhysicsLifeTime(
float lifeTime);
467 void OnTreeCutDown(
EntityAI cutting_entity);
473 GetGame().ObjectGetType(
this, ret);
479 string GetDisplayName()
482 if (NameOverride(tmp))
484 tmp =
Widget.TranslateString(tmp);
488 GetGame().ObjectGetDisplayName(
this, tmp);
494 bool DisplayNameRuinAttach()
500 string GetModelName()
506 proto native owned
string GetShapeName();
510 return GetGame().ObjectRelease(
this);
514 bool IsKindOf(
string type)
516 return GetGame().ObjectIsKindOf(
this, type);
544 bool IsStaticTransmitter()
580 bool IsInventoryItem()
680 bool IsElectricAppliance()
698 bool CanUseHandConstruction()
703 bool IsBeingBackstabbed()
708 void SetBeingBackstabbed(
int backstabType){}
737 bool IsHealthVisible()
758 bool IsScriptedLight()
775 return IsPlainObject() && !IsScenery();
778 bool CanProxyObstruct()
784 bool CanProxyObstructSelf()
789 bool CanBeIgnoredByDroppedItem()
794 bool CanBeAutoDeleted()
800 bool DisableVicinityIcon()
807 proto
void GetNetworkID( out
int lowBits, out
int highBits );
809 string GetNetworkIDString()
812 GetNetworkID( low, high );
813 return high.ToString() + low.ToString();
824 return o.GetDebugName();
834 GetGame().RPC(
this, rpc_type, params, guaranteed, recipient);
838 void RPCSingleParam(
int rpc_type,
Param param,
bool guaranteed,
PlayerIdentity recipient = NULL)
840 GetGame().RPCSingleParam(
this, rpc_type, param, guaranteed, recipient);
852 return GetGame().ObjectGetSelectionPosition(
this,
name);
857 return GetGame().ObjectGetSelectionPositionLS(
this,
name);
862 return GetGame().ObjectGetSelectionPositionMS(
this,
name);
867 return GetGame().ObjectGetSelectionPositionWS(
this,
name);
873 return GetGame().ObjectModelToWorld(
this, modelPos);
878 return GetGame().ObjectWorldToModel(
this, worldPos);
883 proto
string ConfigGetString(
string entryName);
890 proto
string ConfigGetStringRaw(
string entryName);
891 proto
int ConfigGetInt(
string entryName);
892 bool ConfigGetBool(
string entryName)
894 return (ConfigGetInt(entryName) == 1);
897 proto
float ConfigGetFloat(
string entryName);
898 proto
vector ConfigGetVector(
string entryName);
906 proto native
void ConfigGetTextArray(
string entryName, out
TStringArray values);
914 proto native
void ConfigGetTextArrayRaw(
string entryName, out
TStringArray values);
921 proto native
void ConfigGetFloatArray(
string entryName, out
TFloatArray values);
928 proto native
void ConfigGetIntArray(
string entryName, out
TIntArray values);
934 proto native
bool ConfigIsExisting(
string entryName);
940 string item_name = this.
GetType();
942 ConfigGetTextArray(
"cfgVehicles " + item_name +
" itemInfo", item_tag_array);
944 int array_size = item_tag_array.Count();
945 for (
int i = 0; i < array_size; i++)
947 if ( item_tag_array.Get(i) == tag )
959 for(
int i = 0; i < typenames.Count(); i++ )
961 ret = ret || this.IsInherited( typenames.Get(i) );
969 proto native
bool IsPlainObject();
974 proto native
bool IsScenery();
980 proto native
bool HasDamageSystem();
991 proto native
void SetDestructTime(
float time);
998 proto native
float GetHealth(
string zoneName,
string healthType);
1005 proto native
float GetHealth01(
string zoneName,
string healthType);
1012 proto native
float GetMaxHealth(
string zoneName,
string healthType);
1019 proto native
void SetHealth(
string zoneName,
string healthType,
float value);
1024 proto native
void SetFullHealth();
1031 proto native
void AddHealth(
string zoneName,
string healthType,
float value);
1038 proto native
void DecreaseHealth(
string zoneName,
string healthType,
float value);
1045 void DecreaseHealth(
string zoneName,
string healthType,
float value,
bool auto_delete)
1047 DecreaseHealth( zoneName, healthType, value);
1049 float result_health = GetHealth(zoneName, healthType);
1051 if ( auto_delete && result_health <= 0 )
1060 return GetHealth(
"",
"");
1065 return GetHealth01(
"",
"");
1068 float GetMaxHealth()
1070 return GetMaxHealth(
"",
"");
1073 void SetHealth(
float health)
1075 SetHealth(
"",
"", health);
1078 void SetGlobalHealth(
float health)
1080 SetHealth(
"",
"", health);
1083 void SetHealthLevel(
int healthLevel,
string zone =
"")
1085 SetHealth01(zone,
"", GetHealthLevelValue(healthLevel, zone));
1088 void AddHealthLevel(
int healthLevelDelta,
string zone =
"")
1090 int maxHealthLevel = GetNumberOfHealthLevels(zone) - 1;
1091 int newHealthLevel =
Math.Clamp(GetHealthLevel(zone) + healthLevelDelta,0,maxHealthLevel);
1092 SetHealthLevel(newHealthLevel,zone);
1096 void SetHealth01(
string zoneName,
string healthType,
float coef)
1098 SetHealth(zoneName,healthType,(GetMaxHealth(zoneName,healthType)*coef));
1101 void SetHealthMax(
string zoneName =
"",
string healthType =
"")
1103 SetHealth(zoneName,healthType,GetMaxHealth(zoneName,healthType));
1106 void AddHealth(
float add_health)
1108 AddHealth(
"",
"", add_health);
1111 void DecreaseHealth(
float dec_health,
bool auto_delete =
true)
1113 DecreaseHealth(
"",
"", dec_health, auto_delete);
1116 void DecreaseHealthCoef(
float dec_health_coef,
bool auto_delete =
true)
1118 float current_health = GetHealth();
1119 float final_health_coef = GetHealth01() - dec_health_coef;
1120 float final_health = GetMaxHealth() * final_health_coef;
1121 DecreaseHealth(
"",
"", current_health - final_health);
1134 proto native
void ProcessDirectDamage(
int damageType,
EntityAI source,
string componentName,
string ammoName,
vector modelPos,
float damageCoef = 1.0,
int flags = 0);
1149 proto native
void GetDamageZones(out
TStringArray dmgZones);
1155 proto native
vector GetDamageZonePos(
string zoneName);
1160 proto native owned
string GetDamageZoneNameByComponentIndex(
int componentIndex);
1167 proto native
int GetHealthLevel(
string zone =
"");
1174 proto native
int GetNumberOfHealthLevels(
string zone =
"");
1181 proto native
float GetHealthLevelValue(
int healthLevel,
string zone =
"");
1187 proto native
bool GetAllowDamage();
1192 proto native
void SetAllowDamage(
bool val);
1197 proto native
bool GetCanBeDestroyed();
1203 proto native
void SetCanBeDestroyed(
bool val);
1221 void OnSimulationEnabled() {}
1224 void OnSimulationDisabled() {}
1231 SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
true)
1233 return GetGame().CreateSoundOnObject(
this, sound_name, range,
false, create_local);
1237 SoundOnVehicle PlaySoundLoop(
string sound_name,
float range,
bool create_local =
true)
1239 return GetGame().CreateSoundOnObject(
this, sound_name, range,
true, create_local);
1243 bool PlaySoundSet( out
EffectSound sound,
string sound_set,
float fade_in,
float fade_out,
bool loop =
false )
1255 StopSoundSet( sound );
1259 sound =
SEffectManager.PlaySoundOnObject( sound_set,
this, fade_in, fade_out, loop );
1260 sound.SetAutodestroy(
true );
1269 bool PlaySoundSetLoop( out
EffectSound sound,
string sound_set,
float fade_in,
float fade_out )
1271 return PlaySoundSet( sound, sound_set, fade_in, fade_out,
true );
1275 bool PlaySoundSetAtMemoryPointLoopedSafe(out
EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0)
1277 if (sound && sound.IsPlaying())
1281 return PlaySoundSetAtMemoryPointLooped(sound, soundSet, memoryPoint, play_fade_in, stop_fade_out);
1284 bool PlaySoundSetAtMemoryPointLooped(out
EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0)
1286 return PlaySoundSetAtMemoryPoint(sound, soundSet, memoryPoint,
true, play_fade_in, stop_fade_out);
1290 bool PlaySoundSetAtMemoryPoint(out
EffectSound sound,
string soundSet,
string memoryPoint,
bool looped =
false,
float play_fade_in = 0,
float stop_fade_out = 0)
1294 if (MemoryPointExists(memoryPoint))
1296 pos = GetMemoryPointPos(memoryPoint);
1297 pos = ModelToWorld(pos);
1301 ErrorEx(
string.Format(
"Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1305 sound =
SEffectManager.PlaySoundEnviroment(soundSet, pos, play_fade_in, stop_fade_out, looped);
1323 void PostAreaDamageActions();
1324 void PreAreaDamageActions();
1326 void SpawnDamageDealtEffect();
1327 void OnReceivedHit(ImpactEffectsData hitData);
1330 void OnPlayerRecievedHit();
1336 GetNetworkID(lo, hi);
1340 bool NameOverride(out
string output)
1345 bool DescriptionOverride(out
string output)
1350 EntityAI ProcessMeleeItemDamage(
int mode = 0) {}
1352 bool CanBeRepairedToPristine()
1359 if ( MemoryPointExists(
"ce_center") )
1362 return ModelToWorld( GetMemoryPointPos(
"ce_center") );
1372 void SetDebugItem();
1377 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1378 vector parentTransMat[4];
1383 GetTransform(parentTransMat);
1387 GetBoneTransformWS(pivot, parentTransMat);
1390 float scale = GetScale();
1391 scale = 1 / (scale * scale);
1393 arrow.GetTransform(arrowTransMat);
1394 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1397 Math3D.MatrixOrthogonalize4(arrowTransMat);
1399 arrowTransMat[3] = arrowTransMat[3] * scale;
1401 arrow.SetTransform(arrowTransMat);