MantisBT - Zandronum
View Issue Details
0000580Zandronum[All Projects] Bugpublic2011-09-12 20:262018-09-30 22:12
Borg 
Dusk 
normalminorsometimes
closedfixed 
98d 
3.03.0 
0000580: A_CheckSight() works incorrect with spectators
A_CheckSight() sometimes peform a jump (player in sight) when it should not
In code below, A_CheckSight(1) should jump to next frame when there
are no player near by.. but if some player appears in sight, Make state
should be called. Unfortunetly it does not happen always when it should.
I am speaking about clear situation when player is standing near ClipSpawn
and even looking at it.
actor ClipSpawnAmmo
{
Radius 20
Height 26
Speed 5
RenderStyle Translucent
Alpha 0.5
+NOBLOCKMAP
+DROPOFF
states
  {
  Spawn:
    CLIP AAA 5
    CLIP A 1 A_CheckFloor(1)
    wait
    CLIP A 50
    CLIP AAA 350
    CLIP A 10 A_SetTranslucent(0.0)
    goto Make
  Idle:
    CLIP A 10 A_CheckSight(1)
    goto Make
    CLIP A 10
    loop
  Make:
    CLIP A 0 A_PlaySound("misc/spawn",CHAN_BODY)
    CLIP A 0 A_SpawnItem("Clip")
    CLIP A 350 A_SpawnItem("ItemFog")
    CLIP AA 350
    goto Idle
  }
}
No tags attached.
Issue History
2011-09-12 20:26BorgNew Issue
2012-01-14 16:55Torr SamahoNote Added: 0002377
2012-01-14 16:55Torr SamahoStatusnew => feedback
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2015-11-17 22:21BorgNote Added: 0013840
2015-11-17 22:21BorgStatusfeedback => new
2015-11-18 20:31DuskNote Added: 0013848
2015-11-18 21:32BorgNote Added: 0013849
2016-01-12 11:54DuskAssigned To => Dusk
2016-01-12 11:54DuskStatusnew => assigned
2016-01-12 11:55DuskNote Added: 0014076
2016-01-12 19:12cobaltStatusassigned => needs testing
2016-01-12 19:12cobaltTarget Version => 3.0
2016-01-12 19:12cobaltDescription Updatedbug_revision_view_page.php?rev_id=8420#r8420
2016-01-12 19:12cobaltAdditional Information Updatedbug_revision_view_page.php?rev_id=8422#r8422
2016-01-12 19:12cobaltNote Added: 0014079
2016-01-24 19:16Ru5tK1ngNote Added: 0014178
2016-01-31 21:45Ru5tK1ngStatusneeds testing => resolved
2016-01-31 21:45Ru5tK1ngResolutionopen => fixed
2016-01-31 21:45Ru5tK1ngFixed in Version => 3.0
2016-01-31 21:45Ru5tK1ngDescription Updatedbug_revision_view_page.php?rev_id=8610#r8610
2016-01-31 21:45Ru5tK1ngAdditional Information Updatedbug_revision_view_page.php?rev_id=8611#r8611
2018-09-30 22:12Blzut3Statusresolved => closed

Notes
(0002377)
Torr Samaho   
2012-01-14 16:55   
I cannot exactly see from you description what happens and what you think should happen. Based on the summary I assume that you would like A_CheckSight to ignore spectators, right?
(0013840)
Borg   
2015-11-17 22:21   
Can be closed as no longer applicable.
Im using A_Look instead of A_CheckSight with works pefectly.
(0013848)
Dusk   
2015-11-18 20:31   
Just because you are no longer affected doesn't mean that the problem suddenly ceases to exist.
(0013849)
Borg   
2015-11-18 21:32   
Oh well, you are correct..
Question is, if I used A_CheckSight correctly..

Anyway, taking into consideration nearly 4 years of no comments from others,
seems noone else is affected ;)
(0014076)
Dusk   
2016-01-12 11:55   
Sometimes tickets just fall in limbo... this is definitely a bug though. A_CheckSight shouldn't be reacting to spectators like this.
(0014079)
cobalt   
2016-01-12 19:12   
Issue addressed by commit 84d9a31fdd2f: Fixed: A_CheckSight would not jump if a spectator was in the line of sight of the calling actor, fixes 580
Committed by Teemu Piippo [Dusk] on Wednesday 31 December 1969 23:59:57

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/thingdef/thingdef_codeptr.cpp | 4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

(0014178)
Ru5tK1ng   
2016-01-24 19:16   
I tested your code with the latest build and it seems to work as you somewhat described. The spawner always spawns 'clips' when a player is in sight. The spawner still goes to it's make state one time eventually, even if there are no players in sight.