text
stringlengths
0
451
native void UnlinkFromWorld(out LinkContext ctx = null);
native bool CanSeek(Actor target);
native clearscope double AngleTo(Actor target, bool absolute = false) const;
native void AddZ(double zadd, bool moving = true);
native void SetZ(double z);
native clearscope vector2 Vec2To(Actor other) const;
native clearscope vector3 Vec3To(Actor other) const;
native clearscope vector3 Vec3Offset(double x, double y, double z, bool absolute = false) const;
native clearscope vector3 Vec3Angle(double length, double angle, double z = 0, bool absolute = false) const;
native clearscope vector2 Vec2Angle(double length, double angle, bool absolute = false) const;
native clearscope vector2 Vec2Offset(double x, double y, bool absolute = false) const;
native clearscope vector3 Vec2OffsetZ(double x, double y, double atz, bool absolute = false) const;
native double PitchFromVel();
native void VelIntercept(Actor targ, double speed = -1, bool aimpitch = true, bool oldvel = false, bool resetvel = false);
native void VelFromAngle(double speed = 1e37, double angle = 1e37);
native void Vel3DFromAngle(double speed, double angle, double pitch);
native void Thrust(double speed = 1e37, double angle = 1e37);
native clearscope bool isFriend(Actor other) const;
native clearscope bool isHostile(Actor other) const;
native void AdjustFloorClip();
native clearscope DropItem GetDropItems() const;
native void CopyFriendliness (Actor other, bool changeTarget, bool resetHealth = true);
native bool LookForMonsters();
native bool LookForTid(bool allaround, LookExParams params = null);
native bool LookForEnemies(bool allaround, LookExParams params = null);
native bool LookForPlayers(bool allaround, LookExParams params = null);
native bool TeleportMove(Vector3 pos, bool telefrag, bool modifyactor = true);
native clearscope double DistanceBySpeed(Actor other, double speed) const;
native name GetSpecies();
native void PlayActiveSound();
native void Howl();
native void DrawSplash (int count, double angle, int kind);
native void GiveSecret(bool printmsg = true, bool playsound = true);
native clearscope double GetCameraHeight() const;
native clearscope double GetGravity() const;
native void DoMissileDamage(Actor target);
native void PlayPushSound();
native bool BounceActor(Actor blocking, bool onTop);
native bool BounceWall(Line l = null);
native bool BouncePlane(SecPlane plane);
native void PlayBounceSound(bool onFloor);
native bool ReflectOffActor(Actor blocking);
clearscope double PitchTo(Actor target, double zOfs = 0, double targZOfs = 0, bool absolute = false) const
{
Vector3 origin = (pos.xy, pos.z - floorClip + zOfs);
Vector3 dest = (target.pos.xy, target.pos.z - target.floorClip + targZOfs);
Vector3 diff;
if (!absolute)
diff = level.Vec3Diff(origin, dest);
else
diff = dest - origin;
return -atan2(diff.z, diff.xy.Length());
}
//==========================================================================
//
// AActor :: GetLevelSpawnTime
//
// Returns the time when this actor was spawned,
// relative to the current level.
//
//==========================================================================
clearscope int GetLevelSpawnTime() const
{
return SpawnTime - level.totaltime + level.time;
}
//==========================================================================
//
// AActor :: GetAge
//
// Returns the number of ticks passed since this actor was spawned.
//
//==========================================================================
clearscope int GetAge() const
{
return level.totaltime - SpawnTime;
}
clearscope double AccuracyFactor() const
{
return 1. / (1 << (accuracy * 5 / 100));
}
protected native void DestroyAllInventory(); // This is not supposed to be called by user code!
native clearscope Inventory FindInventory(class<Inventory> itemtype, bool subclass = false) const;
native Inventory GiveInventoryType(class<Inventory> itemtype);
native bool UsePuzzleItem(int PuzzleItemType);
action native void SetCamera(Actor cam, bool revert = false);
native bool Warp(Actor dest, double xofs = 0, double yofs = 0, double zofs = 0, double angle = 0, int flags = 0, double heightoffset = 0, double radiusoffset = 0, double pitch = 0);
// DECORATE compatible functions
native double GetZAt(double px = 0, double py = 0, double angle = 0, int flags = 0, int pick_pointer = AAPTR_DEFAULT);