Add GetSelfObituary

This commit is contained in:
f7cjo 2025-02-16 16:16:02 +01:00 committed by Ricardo Luís Vaz Silva
commit f1e6445e82
3 changed files with 33 additions and 1 deletions

View file

@ -244,7 +244,16 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
{
if (attacker == self)
{
message = "$OB_KILLEDSELF";
messagename = "$OB_KILLEDSELF";
IFVIRTUALPTR(self, AActor, GetSelfObituary)
{
VMValue params[] = { self, inflictor, mod.GetIndex() };
VMReturn rett(&ret);
VMCall(func, params, countof(params), &rett, 1);
if (ret.IsNotEmpty()) message = ret.GetChars();
}
}
else
{