0000629: LineAttack ZOffset parameter

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

Moderator: GZDoom Developers

0000629: LineAttack ZOffset parameter

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

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 allExpand view
if (TSP)
   attackz = TSP.AttackZOffset;


Code: Select allExpand view
override void OnDestroy()
   if (master && master is "TheSpecialPlayer")
      let TSP = TheSpecialPlayer(master);
      if (TSP) TSP.AttackZOffset = attackz;

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
Major Cooke
QZDoom Maintenance Team
Joined: 28 Jan 2007

Re: 0000629: LineAttack ZOffset parameter

Postby 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...
User avatar
Putting the XD into *xdeath since 2007
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests