by Marrub » Sat Jan 27, 2018 3:22 pm
_mental_ wrote:I added the following code to
ZombieMan class and it works fine
Code: Select all
override int DamageMobj(Actor inflictor, Actor source, int damage, name mod, int flags, double angle)
{
return super.DamageMobj(inflictor, source, damage, mod, flags, angle);
}
Please post a complete runnable sample.
Sorry, I should have been more specific, it crashes when you call DamageMobj with omitted parameters. The only place in the source that I know of that does this is A_VileAttack, which if you get hit by it as a player, will crash.
Also a related issue, not sure if it needs its own thread: Omitting parameter attributes will cause other weird buginess, including crashing, but not emit a warning or error.
For instance, the override signature in an Inventory-derived class:
will cause crashing if, for instance, this is done:
Code: Select all
if(mo is "PlayerPawn") return true;
However, of course, the correct function signature works fine:
Code: Select all
override bool TryPickup(in out Actor mo)
[quote="_mental_"]I added the following code to [b]ZombieMan[/b] class and it works fine[code]override int DamageMobj(Actor inflictor, Actor source, int damage, name mod, int flags, double angle)
{
return super.DamageMobj(inflictor, source, damage, mod, flags, angle);
}[/code]
Please post a complete runnable sample.[/quote]
Sorry, I should have been more specific, it crashes when you call DamageMobj with omitted parameters. The only place in the source that I know of that does this is A_VileAttack, which if you get hit by it as a player, will crash.
Also a related issue, not sure if it needs its own thread: Omitting parameter attributes will cause other weird buginess, including crashing, but not emit a warning or error.
For instance, the override signature in an Inventory-derived class:
[code]
override bool TryPickup(Actor mo)
[/code]
will cause crashing if, for instance, this is done:
[code]
if(mo is "PlayerPawn") return true;
[/code]
However, of course, the correct function signature works fine:
[code]
override bool TryPickup(in out Actor mo)
[/code]