text
stringlengths
0
451
{
if (GibHealth != int.min)
{
return -abs(GibHealth);
}
else
{
return -int(GetSpawnHealth() * gameinfo.gibfactor);
}
}
virtual double GetDeathHeight()
{
// [RH] Allow the death height to be overridden using metadata.
double metaheight = -1;
if (DamageType == 'Fire')
{
metaheight = BurnHeight;
}
if (metaheight < 0)
{
metaheight = DeathHeight;
}
if (metaheight < 0)
{
return Height * 0.25;
}
else
{
return MAX(metaheight, 0);
}
}
virtual String GetObituary(Actor victim, Actor inflictor, Name mod, bool playerattack)
{
if (mod == 'Telefrag')
{
return "$OB_MONTELEFRAG";
}
else if (mod == 'Melee' && HitObituary.Length() > 0)
{
return HitObituary;
}
return Obituary;
}
virtual int OnDrain(Actor victim, int damage, Name dmgtype)
{
return damage;
}
// called on getting a secret, return false to disable default "secret found" message/sound
virtual bool OnGiveSecret(bool printmsg, bool playsound) { return true; }
// called before and after triggering a teleporter
// return false in PreTeleport() to cancel the action early
virtual bool PreTeleport( Vector3 destpos, double destangle, int flags ) { return true; }
virtual void PostTeleport( Vector3 destpos, double destangle, int flags ) {}
native virtual bool OkayToSwitchTarget(Actor other);
native clearscope static class<Actor> GetReplacement(class<Actor> cls);
native clearscope static class<Actor> GetReplacee(class<Actor> cls);
native static int GetSpriteIndex(name sprt);
native clearscope static double GetDefaultSpeed(class<Actor> type);
native static class<Actor> GetSpawnableType(int spawnnum);
native clearscope static int ApplyDamageFactors(class<Inventory> itemcls, Name damagetype, int damage, int defdamage);
native void RemoveFromHash();
native void ChangeTid(int newtid);
deprecated("3.8", "Use Level.FindUniqueTid() instead") static int FindUniqueTid(int start = 0, int limit = 0)
{
return level.FindUniqueTid(start, limit);
}
native void SetShade(color col);
native clearscope int GetRenderStyle() const;
native clearscope bool CheckKeys(int locknum, bool remote, bool quiet = false);
protected native void CheckPortalTransition(bool linked = true);
native clearscope string GetTag(string defstr = "") const;
native clearscope string GetCharacterName() const;
native void SetTag(string defstr = "");
native clearscope double GetBobOffset(double frac = 0) const;
native void ClearCounters();
native bool GiveBody (int num, int max=0);
native bool HitFloor();
native virtual bool Grind(bool items);
native clearscope bool isTeammate(Actor other) const;
native clearscope int PlayerNumber() const;
native void SetFriendPlayer(PlayerInfo player);
native void SoundAlert(Actor target, bool splash = false, double maxdist = 0);
native void ClearBounce();
native TerrainDef GetFloorTerrain();
native bool CheckLocalView(int consoleplayer = -1 /* parameter is not used anymore but needed for backward compatibilityö. */);
native bool CheckNoDelay();
native bool UpdateWaterLevel (bool splash = true);
native bool IsZeroDamage();
native void ClearInterpolation();
native void ClearFOVInterpolation();
native clearscope Vector3 PosRelative(sector sec) const;
native void RailAttack(FRailParams p);