w/dumb
water 2023-07-24 21:25:47 -04:00
parent c937238366
commit 122db7da5c
1 changed files with 9 additions and 15 deletions

View File

@ -1176,20 +1176,14 @@
)
)
(declare-type enemy basic)
(deftype enemy-hack (basic)
((hit-points int32 :offset 220))
)
(defun is-dead-enemy? ((proc process))
(and (type-type? (-> proc type) enemy) (<= (-> (the enemy proc) hit-points) 0))
)
(defun is-dead-dummy? ((proc process))
(and (type-type? (-> proc type) gun-dummy) (<= (-> (the gun-dummy proc) hit-points) 0))
)
(defun is-good-guy? ((proc process))
(or (type-type? (-> proc type) gun-cit-a)
(type-type? (-> proc type) gun-cit-b)
(type-type? (-> proc type) gun-cit-c)
(type-type? (-> proc type) gun-cit-d)
)
(and (type-type? (-> proc type) enemy) (<= (-> (the enemy-hack proc) hit-points) 0))
)
(defun get-trans-for-aim ((vec vector) (proc process-drawable))
@ -1213,8 +1207,8 @@
(when (and (type-type? (-> proc type) process-focusable)
;(not (= (-> proc state name) 'knocked))
(not (is-dead-enemy? proc))
(not (is-dead-dummy? proc))
(not (is-good-guy? proc))
;(not (is-dead-dummy? proc))
;(not (is-good-guy? proc))
)
(let* ((pos ;(get-trans (the process-focusable proc) 2)
(get-trans-for-aim (new-stack-vector0) (the process-drawable proc))