0000629: LineAttack ZOffset parameter

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

0000629: LineAttack ZOffset parameter

Post 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.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: 0000629: LineAttack ZOffset parameter

Post 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...

Return to “Feature Suggestions [GZDoom]”