0000629: LineAttack ZOffset parameter

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 0000629: LineAttack ZOffset parameter

Re: 0000629: LineAttack ZOffset parameter

by Matt » Tue May 02, 2017 2:30 pm

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

0000629: LineAttack ZOffset parameter

by Major Cooke » Sun Apr 30, 2017 6:53 pm

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.

Top