{$CLEO .csa}

thread 'set5'

var 
    0@ : Integer  // general purporse
    1@ : Integer  // player actor/char
end
 
wait 1000

0DD5: 0@ = get_platform
if 
    0@ <> 2 // PSP
then
    end_thread
end                                            

3@ = 0

while true
    wait 0
    
    0DDD: 0@ = get_mutex_var 0
    if
        0@ <> 0
    then
        wait 150
        3@ = 0
        continue
    end
    
    0004: 1@ = $PLAYER_CHAR
    
    if 
        007F: is_button_pressed 0 button 6     
     then
      if  
        01C2:   is_current_char_weapon 1@ weapon 26
      then      
        gosub @set_aim
        end
     end   
end

:set_aim
0220: set_char $PLAYER_CHAR anim 20 wait_state_time 10 ms
if
wait 2000      
return
