glados: proper portal/laser behavior

This commit is contained in:
Vince Weaver 2017-01-09 13:59:49 -05:00
parent e159e71af7
commit 510924bda7

View File

@ -172,14 +172,21 @@
'
' Handle Laser/Portal Interaction
7000 REM
7010 IF ((ZY>BY-7 AND ZY<BY+7) OR (ZY>GY-7 AND ZY<GY+7)) THEN 7030
7020 GOTO 7500
' ERASE OLD
7030 HCOLOR=4:HPLOT ZX,ZY TO 240,ZY:HPLOT PX,PY TO 0,PY
7032 ZX=BX:IF GX>BX THEN ZX=GX
7034 HCOLOR=5:HPLOT ZX,ZY TO 240,ZY
7036 PX=GX:PY=GY:IF GX>BX THEN PX=BX:PY=BY
7040 HPLOT PX,PY TO 0,PY
7010 HCOLOR=4:HPLOT ZX,ZY TO 240,ZY:HPLOT PX,PY TO 0,PY
' Check if hitting Blue
7010 IF (ZY>BY-7 AND ZY<BY+7) THEN 7030
' Check if hitting Orange
7012 IF (ZY>GY-7 AND ZY<GY+7) THEN 7040
' Not hitting any
7015 PX=0:PY=0:ZX=0:HCOLOR=5:HPLOT ZX,ZY TO 240,ZY
7020 GOTO 7500
7030 REM HIT BLUE
7032 ZX=BX:PX=GX:PY=GY
7035 GOTO 7050
7040 ZX=GX:PX=BX:PY=BY
7050 HCOLOR=5:HPLOT ZX,ZY TO 240,ZY
7055 HPLOT PX,PY TO 0,PY
7500 RETURN
'
' Turret Talking