ootw: slide if crouch while running. not really that noticable

This commit is contained in:
Vince Weaver 2019-08-17 15:51:15 -04:00
parent 57535e3609
commit f6da6b1573
2 changed files with 25 additions and 3 deletions

View File

@ -306,6 +306,15 @@ start_crouch_shoot:
start_crouch:
and #STATE_RUNNING
beq start_crouch_norun
ldx #4 ; slide a bit
stx GAIT
ora #P_CROUCHING
sta PHYSICIST_STATE
jmp done_keypress
start_crouch_norun:
ora #P_CROUCHING
jmp change_state_clear_gait
@ -388,10 +397,7 @@ stand_stance:
jmp change_state_clear_gait
kick:
; lda #STATE_CROUCHING
bit PHYSICIST_STATE ; crouching state in V now
; lda PHYSICIST_STATE
; cmp #P_CROUCHING
bvc kick_standing
lda #P_CROUCH_KICKING

View File

@ -184,6 +184,22 @@ physicist_crouching:
; FIXME: we have an animation?
; if we have some gait left, slide a bit
lda GAIT
beq crouch_done_slide
dec GAIT
bne crouch_done_slide
lda DIRECTION
beq p_slide_left
inc PHYSICIST_X
jmp crouch_done_slide
p_slide_left:
dec PHYSICIST_X
crouch_done_slide:
lda #<crouch2
sta INL