mirror of
https://github.com/PDP-10/its.git
synced 2026-01-31 22:12:14 +00:00
Fix bug when two ships collide and simultaneously hit a sun.
The problem is that the MP1 loop assumes that the object type in the C accumulator stays constant. When the ships collide, one is changed to a fireball, and the other is erased. When the collision with the sun is detected, the object type in C is still "ship". Getting C fresh each time at MP2 fixes the bug.
This commit is contained in:
@@ -1334,11 +1334,10 @@ IFN $ITS,[
|
||||
SETZ MP1,
|
||||
ML1: SKIPN OBJFLG(MP1)
|
||||
JRST MQ1 ;object is not active
|
||||
SKIPG C,OBJFLG(MP1)
|
||||
JRST MQ4 ;object is not collideable
|
||||
MOVEI MP2,1(MP1) ;start with objects after this one
|
||||
ML2: SKIPG D,OBJFLG(MP2)
|
||||
JRST MQ2B ;obj cannot collide
|
||||
ML2: SKIPLE C,OBJFLG(MP1)
|
||||
SKIPG D,OBJFLG(MP2)
|
||||
JRST MQ2B ;obj cannot collide
|
||||
MOVE A,OBJX(MP1) ;compute distance between them
|
||||
FSBR A,OBJX(MP2)
|
||||
MOVM A,A
|
||||
@@ -1357,7 +1356,6 @@ ML2: SKIPG D,OBJFLG(MP2)
|
||||
|
||||
; Collision! - find types
|
||||
|
||||
PUSH P,C
|
||||
PUSH P,MP1
|
||||
PUSH P,MP2
|
||||
HLRZS C
|
||||
@@ -1371,13 +1369,12 @@ ML2: SKIPG D,OBJFLG(MP2)
|
||||
PUSHJ P,@COLTBL(C) ;VECTOR TO APPROPRIATE RTN
|
||||
POP P,MP2
|
||||
POP P,MP1
|
||||
POP P,C
|
||||
|
||||
MQ2B: CAIGE MP2,OBJCTS-1 ;check for more collisions here
|
||||
AOJA MP2,ML2 ;go do more collisions for this object
|
||||
|
||||
;now create display list for object
|
||||
MQ4: SKIPE A,OBJFLG(MP1) ;in case object was removed in coll.
|
||||
SKIPE A,OBJFLG(MP1) ;in case object was removed in coll.
|
||||
PUSHJ P,(A) ;make the list and other random functions
|
||||
MQ1: CAIGE MP1,OBJCTS-2 ;next to last object
|
||||
AOJA MP1,ML1 ; no - continue
|
||||
Reference in New Issue
Block a user