Page 1 of 1

0000629: LineAttack ZOffset parameter

Posted: Sun Apr 30, 2017 6:53 pm
by Major Cooke
https://mantis.zdoom.org/view.php?id=629
Right now I have to perform a nasty hack that involves modifying the player's AttackZOffset in order to make my custom third person camera work, which may or may not leave undesirable results on the rare occasion. I.e.

Code: Select all

if (TSP)
{
	attackz = TSP.AttackZOffset;
}
Or:

Code: Select all

override void OnDestroy()
{
	if (master && master is "TheSpecialPlayer")
	{
		let TSP = TheSpecialPlayer(master);
		if (TSP) TSP.AttackZOffset = attackz;
	}
	Super.OnDestroy();
}
One actor might be okay, but more than one might not be. This could cause some serious consequences later if this continues unchecked.

Re: 0000629: LineAttack ZOffset parameter

Posted: Tue May 02, 2017 2:30 pm
by Matt
Since we're migrating from the Mantis I'll copypaste here Graf's response when I suggested this (where my own focus was on non-players where the offset is fixed at half height plus 8, so I just sandwiched the LineAttack call between 2 SetXYZAddZs):
The main problem here is that P_LineAttack makes some broad assumptions about the shooting actor, I'd rather not touch it. All I'd do would be a wrapper just like this anyway...