MantisBT - Zandronum
View Issue Details
0002774Zandronum[All Projects] Bugpublic2016-07-08 21:592016-08-18 09:33
Ivan 
 
highminorsometimes
closedno change required 
MicrosoftWindowsXP/Vista/7
1.4 
 
0002774: Player targets are inaccurate when in pain state
When a player gets hurt, usually the person doing the damage is the target of the player. It is inconsistent in Zandronum however.

To test, I made a tlms server and joined it twice. Screenshots below illustrate the results I got in order. First, they don't recognize, then they suddenly work. This messes up randomly so it's hard to reproduce. I believe this to be a very old bug though. The target is more often than not yourself however.
Screenshots -'http://imgur.com/a/Pavqu [^]'
Explanation: Left one is the victim tid (guy getting shot), right one is the shooter (the target on my view)
No tags attached.
? paintest.pk3 (1,016) 2016-07-08 22:01
/tracker/file_download.php?file_id=1855&type=bug
? paintestmons.pk3 (1,076) 2016-07-10 14:53
/tracker/file_download.php?file_id=1862&type=bug
Issue History
2016-07-08 21:59IvanNew Issue
2016-07-08 22:01IvanFile Added: paintest.pk3
2016-07-08 22:32ZzZomboNote Added: 0015224
2016-07-08 23:36IvanNote Added: 0015225
2016-07-08 23:36IvanNote Edited: 0015225bug_revision_view_page.php?bugnote_id=15225#r9225
2016-07-10 13:15IvanNote Edited: 0015225bug_revision_view_page.php?bugnote_id=15225#r9239
2016-07-10 13:56Torr SamahoNote Added: 0015254
2016-07-10 14:35IvanNote Added: 0015257
2016-07-10 14:52IvanNote Edited: 0015257bug_revision_view_page.php?bugnote_id=15257#r9241
2016-07-10 14:53IvanFile Added: paintestmons.pk3
2016-07-10 14:55IvanNote Edited: 0015257bug_revision_view_page.php?bugnote_id=15257#r9242
2016-07-10 15:02Edward-sanNote Added: 0015260
2016-07-10 15:02Edward-sanAssigned To => Edward-san
2016-07-10 15:02Edward-sanStatusnew => feedback
2016-07-10 15:16IvanNote Added: 0015263
2016-07-10 15:16IvanStatusfeedback => assigned
2016-07-10 15:38Edward-sanNote Added: 0015264
2016-07-10 15:38Edward-sanStatusassigned => feedback
2016-07-10 16:09IvanNote Added: 0015267
2016-07-10 16:09IvanStatusfeedback => assigned
2016-07-10 16:39LeonardNote Added: 0015271
2016-07-10 17:11LeonardNote Edited: 0015271bug_revision_view_page.php?bugnote_id=15271#r9244
2016-07-10 17:19IvanNote Added: 0015272
2016-07-10 21:52Edward-sanNote Added: 0015277
2016-07-10 21:52Edward-sanStatusassigned => feedback
2016-07-10 22:24IvanNote Added: 0015278
2016-07-10 22:24IvanStatusfeedback => assigned
2016-08-13 14:57IvanNote Added: 0015442
2016-08-18 09:33Edward-sanNote Added: 0015479
2016-08-18 09:33Edward-sanStatusassigned => closed
2016-08-18 09:33Edward-sanAssigned ToEdward-san =>
2016-08-18 09:33Edward-sanResolutionopen => no change required

Notes
(0015224)
ZzZombo   
2016-07-08 22:32   
Is it a clientside script? Clients aren't notified about actors' targets, so any changes to that is accidental.
(0015225)
Ivan   
2016-07-08 23:36   
(edited on: 2016-07-10 13:15)
Not clientside at all. See the example wad.

As an extra information, this works 100% of the time in a Death script, ie. the player knows the target _for sure_ when they die.

(0015254)
Torr Samaho   
2016-07-10 13:56   
Does this also happen offline? If so, are also other game modes affected? If so, is this any different in Zandronum 3.0 or in GZDoom 1.8.6?
(0015257)
Ivan   
2016-07-10 14:35   
(edited on: 2016-07-10 14:55)
The thing is I can't test this really offline because this seems to be a player only issue. What I can do is however create a testing monster with a specific TID and see if that TID shows up. I'll update this when I get results.

EDIT: Results:'http://imgur.com/a/B6PRy [^]'

Those with statusbar fully shown are from 3.0

Picture 1: A failure of target recognition on 3.0 countdown.

Picture 2: Same from the other player shooting, this time not on countdown.

Picture 3: Same as above.

Picture 4: Same.

Picture 5: Zandronum 2.1.2, fail after countdown.

Picture 6 - 7 - 8: Offline Zandronum 2.1.2 tests. All failed.

Picture 9: Countdown during 2.1.2.

Picture 10: After countdown, somehow working.

Picture 11 - 12: Same as above.

Picture 13: Working during an active round with the monster this time.

The rest are all from online games except the 3rd last one with the chaingunner. That was an offline game test working.

Overall this is quite random in the way it happens however, after each party shoot each other a bit it seems to fix itself by itself. Don't know how that all works out.

Gzdoom 1.8.6: Happens randomly as well, sometimes working sometimes not working. Offline. --'http://imgur.com/a/szImc [^]'

(0015260)
Edward-san   
2016-07-10 15:02   
Quote
Gzdoom 1.8.6: Happens randomly as well, sometimes working sometimes not working. Offline. --http://imgur.com/a/szImc [^]


Does it happen also in zdoom 2.8.1?
(0015263)
Ivan   
2016-07-10 15:16   
Confirmed to be happening:'http://imgur.com/a/jJyxZ [^]' -- On my third attempt it messed up.
(0015264)
Edward-san   
2016-07-10 15:38   
Then try with zdoom latest devbuild here.
(0015267)
Ivan   
2016-07-10 16:09   
Oddly enough it's harder to reproduce but still is there. As I stated before, the target is fixed after me shooting the monster/player a few times.

Screenshots:'http://imgur.com/a/uiHUH [^]'

In one of the images you can observe that the target tid is shown to be 32768 at first but later messes up to become 1000 for some reason. Not sure why.
(0015271)
Leonard   
2016-07-10 16:39   
(edited on: 2016-07-10 17:11)
If I understood correctly you're talking about the target pointer of an actor rather than who the player is aiming at yet you're using SetActivatorToTarget in your example wad.
You have to consider this:
Quote
If the tid being referenced is a living player, the new activator is first thing the player is aiming at.
If there were no actors with the supplied tid, this function returns false and the activator is left unchanged.

What you really want is SetActivator(0, APPTR_TARGET);
On a side note, actors don't set their target pointer when hurt to the damager immediatly unless the +QUICKTORETALIATE flag is set.

(0015272)
Ivan   
2016-07-10 17:19   
With that change everything seems to work. How do I compile it under Zandronum though? The compiler doesn't accept a 2nd parameter for that function.

I suppose it's missing in Zandronum. In which case I guess it'd make sense to ask for a backport of it in a different ticket.
(0015277)
Edward-san   
2016-07-10 21:52   
Which version of acc are you using? That shouldn't happen. Also there's a typo: SetActivator(0, APPTR_TARGET) where it should be SetActivator(0, AAPTR_TARGET) .
(0015278)
Ivan   
2016-07-10 22:24   
I was using BCC provided by Positron (?) I think, not sure. It probably is very old but has quite nice features. I also corrected that typo on my end.
(0015442)
Ivan   
2016-08-13 14:57   
Verified that the method suggested by Leonard works (used an updated BCC version provided by Monsterovich). This can be closed until it's fixed in Zdoom I guess. (If ever)
(0015479)
Edward-san   
2016-08-18 09:33   
IIUC there's nothing to fix, neither in zdoom.