Пример #1
0
def W_Attack(*qwp_extra):
    r = 0
    if not W_CheckNoAmmo():
        return 
    qc.makevectors(qc.self.v_angle) #  calculate forward angle for velocity
    qc.self.show_hostile = qc.time + 1 #  wake monsters up
    if qc.self.weapon == defs.IT_AXE:
        qc.self.attack_finished = qc.time + 0.5
        qc.self.sound(defs.CHAN_WEAPON, 'weapons/ax1.wav', 1, defs.ATTN_NORM)
        r = random.random()
        if r < 0.25:
            player.player_axe1()
        elif r < 0.5:
            player.player_axeb1()
        elif r < 0.75:
            player.player_axec1()
        else:
            player.player_axed1()
        
    elif qc.self.weapon == defs.IT_SHOTGUN:
        player.player_shot1()
        qc.self.attack_finished = qc.time + 0.5
        W_FireShotgun()
        
    elif qc.self.weapon == defs.IT_SUPER_SHOTGUN:
        player.player_shot1()
        qc.self.attack_finished = qc.time + 0.7
        W_FireSuperShotgun()
        
    elif qc.self.weapon == defs.IT_NAILGUN:
        player.player_nail1()
        
    elif qc.self.weapon == defs.IT_SUPER_NAILGUN:
        player.player_nail1()
        
    elif qc.self.weapon == defs.IT_GRENADE_LAUNCHER:
        player.player_rocket1()
        qc.self.attack_finished = qc.time + 0.6
        W_FireGrenade()
        
    elif qc.self.weapon == defs.IT_ROCKET_LAUNCHER:
        player.player_rocket1()
        qc.self.attack_finished = qc.time + 0.8
        W_FireRocket()
        
    elif qc.self.weapon == defs.IT_LIGHTNING:
        qc.self.attack_finished = qc.time + 0.1
        qc.self.sound(defs.CHAN_AUTO, 'weapons/lstart.wav', 1, defs.ATTN_NORM)
        player.player_light1()
Пример #2
0
def W_Attack(*qwp_extra):
    if not W_CheckNoAmmo():
        return
    qc.makevectors(qc.self.v_angle)  #  calculate forward angle for velocity
    qc.self.show_hostile = qc.time + 1  #  wake monsters up
    if qc.self.weapon == defs.IT_GRAPPLE:
        if qc.self.hook_out:
            player.player_chain3()
        else:
            player.player_chain1()
        qc.self.attack_finished = qc.time + 0.1

    if qc.self.weapon == defs.IT_AXE:
        qc.self.sound(defs.CHAN_WEAPON, 'weapons/ax1.wav', 1, defs.ATTN_NORM)
        r = random.random()
        if r < 0.25:
            player.player_axe1()
        elif r < 0.5:
            player.player_axeb1()
        elif r < 0.75:
            player.player_axec1()
        else:
            player.player_axed1()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.3
            HasteSound()

        else:
            qc.self.attack_finished = qc.time + 0.5

    elif qc.self.weapon == defs.IT_SHOTGUN:
        player.player_shot1()
        W_FireShotgun()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.3
            HasteSound()
        else:
            qc.self.attack_finished = qc.time + 0.5

    elif qc.self.weapon == defs.IT_SUPER_SHOTGUN:
        player.player_shot1()
        W_FireSuperShotgun()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.4
            HasteSound()
        else:
            qc.self.attack_finished = qc.time + 0.7

    elif qc.self.weapon == defs.IT_NAILGUN:
        player.player_nail1()

    elif qc.self.weapon == defs.IT_SUPER_NAILGUN:
        player.player_nail1()

    elif qc.self.weapon == defs.IT_GRENADE_LAUNCHER:
        player.player_rocket1()
        W_FireGrenade()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.3
            HasteSound()
        else:
            qc.self.attack_finished = qc.time + 0.6

    elif qc.self.weapon == defs.IT_ROCKET_LAUNCHER:
        player.player_rocket1()
        W_FireRocket()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.4
            HasteSound()
        else:
            qc.self.attack_finished = qc.time + 0.8

    elif qc.self.weapon == defs.IT_LIGHTNING:
        qc.self.attack_finished = qc.time + 0.1
        qc.self.sound(defs.CHAN_AUTO, 'weapons/lstart.wav', 1, defs.ATTN_NORM)
        player.player_light1()
Пример #3
0
def W_Attack(*qwp_extra):
    if not W_CheckNoAmmo():
        return 
    qc.makevectors(qc.self.v_angle) #  calculate forward angle for velocity
    qc.self.show_hostile = qc.time + 1 #  wake monsters up
    if qc.self.weapon == defs.IT_GRAPPLE:
        if qc.self.hook_out:
            player.player_chain3()
        else:
            player.player_chain1()
        qc.self.attack_finished = qc.time + 0.1
        
    if qc.self.weapon == defs.IT_AXE:
        qc.self.sound(defs.CHAN_WEAPON, 'weapons/ax1.wav', 1, defs.ATTN_NORM)
        r = random.random()
        if r < 0.25:
            player.player_axe1()
        elif r < 0.5:
            player.player_axeb1()
        elif r < 0.75:
            player.player_axec1()
        else:
            player.player_axed1()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.3
            HasteSound()
            
        else:
            qc.self.attack_finished = qc.time + 0.5
        
    elif qc.self.weapon == defs.IT_SHOTGUN:
        player.player_shot1()
        W_FireShotgun()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.3
            HasteSound()            
        else:
            qc.self.attack_finished = qc.time + 0.5
        
    elif qc.self.weapon == defs.IT_SUPER_SHOTGUN:
        player.player_shot1()
        W_FireSuperShotgun()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.4
            HasteSound()            
        else:
            qc.self.attack_finished = qc.time + 0.7
        
    elif qc.self.weapon == defs.IT_NAILGUN:
        player.player_nail1()
        
    elif qc.self.weapon == defs.IT_SUPER_NAILGUN:
        player.player_nail1()
        
    elif qc.self.weapon == defs.IT_GRENADE_LAUNCHER:
        player.player_rocket1()
        W_FireGrenade()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.3
            HasteSound()            
        else:
            qc.self.attack_finished = qc.time + 0.6
        
    elif qc.self.weapon == defs.IT_ROCKET_LAUNCHER:
        player.player_rocket1()
        W_FireRocket()
        #  RUNE: rune of hell magic
        if qc.self.player_flag & defs.ITEM_RUNE3_FLAG:
            qc.self.attack_finished = qc.time + 0.4
            HasteSound()            
        else:
            qc.self.attack_finished = qc.time + 0.8
        
    elif qc.self.weapon == defs.IT_LIGHTNING:
        qc.self.attack_finished = qc.time + 0.1
        qc.self.sound(defs.CHAN_AUTO, 'weapons/lstart.wav', 1, defs.ATTN_NORM)
        player.player_light1()