Changeset 594 for abuse/trunk/data/lisp
- Timestamp:
- May 8, 2011, 12:13:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/data/lisp/input.lsp
r589 r594 43 43 (setq weapon-right-key (get_key_code "insert")) 44 44 45 (setq key-shiftr (get_key_code "right_shift")) 46 (setq key-end (get_key_code "end")) 47 48 (setq key-a (get_key_code "a")) 49 (setq key-b (get_key_code "b")) 50 (setq key-c (get_key_code "c")) 51 (setq key-d (get_key_code "d")) 52 (setq key-e (get_key_code "e")) 53 (setq key-f (get_key_code "f")) 54 (setq key-g (get_key_code "g")) 55 (setq key-h (get_key_code "h")) 56 (setq key-i (get_key_code "i")) 57 (setq key-j (get_key_code "j")) 58 (setq key-k (get_key_code "k")) 59 (setq key-l (get_key_code "l")) 60 (setq key-m (get_key_code "m")) 61 (setq key-n (get_key_code "n")) 62 (setq key-o (get_key_code "o")) 63 (setq key-p (get_key_code "p")) 64 (setq key-q (get_key_code "q")) 65 (setq key-r (get_key_code "r")) 66 (setq key-s (get_key_code "s")) 67 (setq key-t (get_key_code "t")) 68 (setq key-u (get_key_code "u")) 69 (setq key-v (get_key_code "v")) 70 (setq key-w (get_key_code "w")) 71 (setq key-x (get_key_code "x")) 72 (setq key-y (get_key_code "y")) 73 (setq key-z (get_key_code "z")) 74 75 (setq dray_has_fired 1) 76 (setq godmode 0) 77 (setq enemytarget 0) 78 (setq noclip 0) 45 79 46 80 (defun get_local_input () 81 ;; fRaBs Twist extension input logic 82 (if (eq godmode 1) 83 (progn 84 (with_object (bg) (set_hp 100)) 85 (if (or (eq (with_object (bg) (state)) flinch_up) 86 (eq (with_object (bg) (state)) flinch_down)) 87 (with_object (bg) (set_state stopped))))) 88 (if (eq noclip 1) 89 (progn 90 (with_object (bg) (set_gravity 0)) 91 (if (local_key_pressed up-key) 92 (with_object (bg) (set_y (- (y) run_top_speed)))) 93 (if (local_key_pressed down-key) 94 (with_object (bg) (set_y (+ (y) run_top_speed)))) 95 (if (local_key_pressed left-key) 96 (with_object (bg) (set_x (- (x) run_top_speed)))) 97 (if (local_key_pressed right-key) 98 (with_object (bg) (set_x (+ (x) run_top_speed)))) 99 (with_object (bg) (set_gravity 0)))) 100 (if (and (eq (mod (game_tick) 15) 0) 101 (eq dray_has_fired 1)) 102 (setq dray_has_fired 0)) 103 (if (local_key_pressed key-shiftr) 104 (save_game (concatenate 'string "save" 105 (digstr (get_save_slot) 4) ".spe"))) 106 (if (and (eq (third (mouse_stat)) 1) 107 (with_object (bg) (eq (current_weapon_type) 7))) 108 (if (and (eq dray_has_fired 0) 109 (<= (ammo_total 7) 1) 110 (not (or (<= (with_object (bg) (hp)) 0) 111 (eq (with_object (bg) (state)) dieing) 112 (eq (with_object (bg) (state)) dead) 113 (eq (with_object (bg) (state)) flinch_up) 114 (eq (with_object (bg) (state)) flinch_down) 115 (eq (with_object (bg) (state)) climbing) 116 (eq (with_object (bg) (state)) climb_off) 117 (eq (with_object (bg) (state)) climb_on)))) 118 (progn 119 (setq dray_has_fired 1) 120 (play_sound DEATH_RAY_SND 127 (x) (y)) 121 (with_object (bg) (add_object DEATH_RAY (x) (- (y) 122 (/ (picture_height) 2)))) 123 (with_object (bg) (add_ammo 7 -1))))) 124 ;; Original Abuse logic 47 125 (let ((mstat (mouse_stat))) 48 (list (if (local_key_pressed left-key) 49 -1 126 (list (if (local_key_pressed left-key) -1 50 127 (if (local_key_pressed right-key) 1 0)) ;; xv 51 (if (local_key_pressed up-key) 52 -1 128 (if (local_key_pressed up-key) -1 53 129 (if (local_key_pressed down-key) 1 0)) ;; yv 54 130 (eq (fourth mstat) 1) ;; special button … … 57 133 (if (or (eq (fifth mstat) 1) 58 134 (local_key_pressed weapon-left-key)) -1 ;; weapon toggle 59 (if (local_key_pressed weapon-right-key) 135 (if (local_key_pressed weapon-right-key) 1 0)) 60 136 (first mstat) ;; mx 61 137 (second mstat) ;; my
Note: See TracChangeset
for help on using the changeset viewer.