Пример #1
0
def light_fluoro(*qwp_extra):
    if qc.self.style >= 32:
        qc.self.use = light_use
        if qc.self.spawnflags & START_OFF:
            engine.lightstyle(qc.self.style, 'a')
        else:
            engine.lightstyle(qc.self.style, 'm')
        
    engine.precache_sound('ambience/fl_hum1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/fl_hum1.wav', 0.5, defs.ATTN_STATIC)
Пример #2
0
def item_artifact_envirosuit(*qwp_extra):
    qc.self.touch = powerup_touch
    engine.precache_model('progs/suit.mdl')
    engine.precache_sound('items/suit.wav')
    engine.precache_sound('items/suit2.wav')
    qc.self.noise = 'items/suit.wav'
    qc.self.setmodel('progs/suit.mdl')
    qc.self.netname = 'Biosuit'
    qc.self.items = defs.IT_SUIT
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #3
0
def trigger_teleport(*qwp_extra):
    subs.InitTrigger()
    qc.self.touch = teleport_touch
    #  find the destination
    if not qc.self.target:
        qc.objerror('no target')
    qc.self.use = teleport_use
    if not (qc.self.spawnflags & SILENT):
        engine.precache_sound('ambience/hum1.wav')
        o = (qc.self.mins + qc.self.maxs) * 0.5
        engine.ambientsound(o, 'ambience/hum1.wav', 0.5, defs.ATTN_STATIC)
Пример #4
0
def item_artifact_envirosuit(*qwp_extra):
    qc.self.touch = powerup_touch
    engine.precache_model('progs/suit.mdl')
    engine.precache_sound('items/suit.wav')
    engine.precache_sound('items/suit2.wav')
    qc.self.noise = 'items/suit.wav'
    qc.self.setmodel('progs/suit.mdl')
    qc.self.netname = 'Biosuit'
    qc.self.items = defs.IT_SUIT
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #5
0
def light_fluoro(*qwp_extra):
    if qc.self.style >= 32:
        qc.self.use = light_use
        if qc.self.spawnflags & START_OFF:
            engine.lightstyle(qc.self.style, 'a')
        else:
            engine.lightstyle(qc.self.style, 'm')

    engine.precache_sound('ambience/fl_hum1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/fl_hum1.wav', 0.5,
                        defs.ATTN_STATIC)
Пример #6
0
def trigger_teleport(*qwp_extra):
    subs.InitTrigger()
    qc.self.touch = teleport_touch
    #  find the destination 
    if not qc.self.target:
        qc.objerror('no target')
    qc.self.use = teleport_use
    if not (qc.self.spawnflags & SILENT):
        engine.precache_sound('ambience/hum1.wav')
        o = (qc.self.mins + qc.self.maxs) * 0.5
        engine.ambientsound(o, 'ambience/hum1.wav', 0.5, defs.ATTN_STATIC)
Пример #7
0
def func_train(*qwp_extra):
    if not qc.self.speed:
        qc.self.speed = 100
    if not qc.self.target:
        qc.objerror('func_train without a target')
    if not qc.self.dmg:
        qc.self.dmg = 2
    if qc.self.sounds == 0:
        qc.self.noise = ('misc/null.wav')
        engine.precache_sound('misc/null.wav')
        qc.self.noise1 = ('misc/null.wav')
        engine.precache_sound('misc/null.wav')
        
    if qc.self.sounds == 1:
        qc.self.noise = ('plats/train2.wav')
        engine.precache_sound('plats/train2.wav')
        qc.self.noise1 = ('plats/train1.wav')
        engine.precache_sound('plats/train1.wav')
        
    qc.self.cnt = 1
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.blocked = train_blocked
    qc.self.use = train_use
    qc.self.classname = 'train'
    qc.self.setmodel(qc.self.model)
    qc.setsize(qc.self, qc.self.mins, qc.self.maxs)
    qc.setorigin(qc.self, qc.self.origin)
    #  start trains on the second frame, to make sure their targets have had
    #  a chance to spawn
    qc.self.nextthink = qc.self.ltime + 0.1
    qc.self.think = func_train_find
Пример #8
0
def func_train(*qwp_extra):
    if not qc.self.speed:
        qc.self.speed = 100
    if not qc.self.target:
        qc.objerror('func_train without a target')
    if not qc.self.dmg:
        qc.self.dmg = 2
    if qc.self.sounds == 0:
        qc.self.noise = ('misc/null.wav')
        engine.precache_sound('misc/null.wav')
        qc.self.noise1 = ('misc/null.wav')
        engine.precache_sound('misc/null.wav')        
    elif qc.self.sounds == 1:
        qc.self.noise = ('plats/train2.wav')
        engine.precache_sound('plats/train2.wav')
        qc.self.noise1 = ('plats/train1.wav')
        engine.precache_sound('plats/train1.wav')
        
    qc.self.cnt = 1
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.blocked = train_blocked
    qc.self.use = train_use
    qc.self.classname = 'train'
    qc.self.setmodel(qc.self.model)
    qc.setsize(qc.self, qc.self.mins, qc.self.maxs)
    qc.setorigin(qc.self, qc.self.origin)
    #  start trains on the second frame, to make sure their targets have had
    #  a chance to spawn
    qc.self.nextthink = qc.self.ltime + 0.1
    qc.self.think = func_train_find
Пример #9
0
def trigger_secret(*qwp_extra):
    qc.total_secrets += 1
    qc.self.wait = -1
    if not qc.self.message:
        qc.self.message = 'You found a secret area!'
    if not qc.self.sounds:
        qc.self.sounds = 1
    if qc.self.sounds == 1:
        engine.precache_sound('misc/secret.wav')
        qc.self.noise = 'misc/secret.wav'

    elif qc.self.sounds == 2:
        engine.precache_sound('misc/talk.wav')
        qc.self.noise = 'misc/talk.wav'

    trigger_multiple()
Пример #10
0
def trigger_secret(*qwp_extra):
    qc.total_secrets += 1
    qc.self.wait = -1
    if not qc.self.message:
        qc.self.message = 'You found a secret area!'
    if not qc.self.sounds:
        qc.self.sounds = 1
    if qc.self.sounds == 1:
        engine.precache_sound('misc/secret.wav')
        qc.self.noise = 'misc/secret.wav'
        
    elif qc.self.sounds == 2:
        engine.precache_sound('misc/talk.wav')
        qc.self.noise = 'misc/talk.wav'
        
    trigger_multiple()
Пример #11
0
def misc_explobox2(*qwp_extra):
    qc.self.solid = defs.SOLID_BBOX
    qc.self.movetype = defs.MOVETYPE_NONE
    engine.precache_model('maps/b_exbox2.bsp')
    qc.self.setmodel('maps/b_exbox2.bsp')
    qc.setsize(qc.self, Vector(0, 0, 0), Vector(32, 32, 32))
    engine.precache_sound('weapons/r_exp3.wav')
    qc.self.health = 20
    qc.self.th_die = barrel_explode
    qc.self.takedamage = defs.DAMAGE_AIM
    qc.self.origin %= Vector(None, None, qc.self.origin.z + 2)
    oldz = qc.self.origin.z
    qc.droptofloor()
    if oldz - qc.self.origin.z > 250:
        engine.dprint('item fell out of level at ')
        engine.dprint(str(qc.self.origin))
        engine.dprint('\012')
        qc.self.remove()
Пример #12
0
def misc_explobox2(*qwp_extra):
    qc.self.solid = defs.SOLID_BBOX
    qc.self.movetype = defs.MOVETYPE_NONE
    engine.precache_model('maps/b_exbox2.bsp')
    qc.self.setmodel('maps/b_exbox2.bsp')
    qc.setsize(qc.self, Vector(0, 0, 0), Vector(32, 32, 32))
    engine.precache_sound('weapons/r_exp3.wav')
    qc.self.health = 20
    qc.self.th_die = barrel_explode
    qc.self.takedamage = defs.DAMAGE_AIM
    qc.self.origin %= Vector(None, None, qc.self.origin.z + 2)
    oldz = qc.self.origin.z
    qc.droptofloor()
    if oldz - qc.self.origin.z > 250:
        engine.dprint('item fell out of level at ')
        engine.dprint(str(qc.self.origin))
        engine.dprint('\012')
        qc.self.remove()
Пример #13
0
def StartRuneSpawn(*qwp_extra):
    if defs.runespawned or defs.gamestart:
        return 
    defs.runespawned = 1
    engine.precache_model('progs/end1.mdl')
    engine.precache_model('progs/end2.mdl')
    engine.precache_model('progs/end3.mdl')
    engine.precache_model('progs/end4.mdl')
    engine.precache_model('progs/m_s_key.mdl')
    engine.precache_model('progs/m_g_key.mdl')
    engine.precache_sound('rune/rune1.wav')
    engine.precache_sound('rune/rune2.wav')
    engine.precache_sound('rune/rune22.wav') #  special rune and quad combo
    engine.precache_sound('rune/rune3.wav')
    engine.precache_sound('rune/rune4.wav')
    #  spawn the runes
    rspawn = qc.spawn()
    rspawn.nextthink = qc.time + 0.1
    rspawn.think = SpawnRunes
Пример #14
0
def trigger_multiple(*qwp_extra):
    if qc.self.sounds == 1:
        engine.precache_sound('misc/secret.wav')
        qc.self.noise = 'misc/secret.wav'
        
    elif qc.self.sounds == 2:
        engine.precache_sound('misc/talk.wav')
        qc.self.noise = 'misc/talk.wav'
        
    elif qc.self.sounds == 3:
        engine.precache_sound('misc/trigger1.wav')
        qc.self.noise = 'misc/trigger1.wav'
        
    if not qc.self.wait:
        qc.self.wait = 0.2
    qc.self.use = multi_use
    subs.InitTrigger()
    if qc.self.health:
        if qc.self.spawnflags & SPAWNFLAG_NOTOUCH:
            qc.objerror("health and notouch don't make sense\012")
        qc.self.max_health = qc.self.health
        qc.self.th_die = multi_killed
        qc.self.takedamage = defs.DAMAGE_YES
        qc.self.solid = defs.SOLID_BBOX
        qc.setorigin(qc.self, qc.self.origin) #  make sure it links into the world
        
    else:
        if not (qc.self.spawnflags & SPAWNFLAG_NOTOUCH):
            qc.self.touch = multi_touch
Пример #15
0
def item_health(*qwp_extra):
    qc.self.touch = health_touch
    if qc.self.spawnflags & H_ROTTEN:
        engine.precache_model('maps/b_bh10.bsp')
        engine.precache_sound('items/r_item1.wav')
        qc.self.setmodel('maps/b_bh10.bsp')
        qc.self.noise = 'items/r_item1.wav'
        qc.self.healamount = 15
        qc.self.healtype = 0        
    elif qc.self.spawnflags & H_MEGA:
        engine.precache_model('maps/b_bh100.bsp')
        engine.precache_sound('items/r_item2.wav')
        qc.self.setmodel('maps/b_bh100.bsp')
        qc.self.noise = 'items/r_item2.wav'
        qc.self.healamount = 100
        qc.self.healtype = 2        
    else:
        engine.precache_model('maps/b_bh25.bsp')
        engine.precache_sound('items/health1.wav')
        qc.self.setmodel('maps/b_bh25.bsp')
        qc.self.noise = 'items/health1.wav'
        qc.self.healamount = 25
        qc.self.healtype = 1
        
    qc.setsize(qc.self, Vector(0, 0, 0), Vector(32, 32, 56))
    StartItem()
Пример #16
0
def trigger_multiple(*qwp_extra):
    if qc.self.sounds == 1:
        engine.precache_sound('misc/secret.wav')
        qc.self.noise = 'misc/secret.wav'

    elif qc.self.sounds == 2:
        engine.precache_sound('misc/talk.wav')
        qc.self.noise = 'misc/talk.wav'

    elif qc.self.sounds == 3:
        engine.precache_sound('misc/trigger1.wav')
        qc.self.noise = 'misc/trigger1.wav'

    if not qc.self.wait:
        qc.self.wait = 0.2
    qc.self.use = multi_use
    subs.InitTrigger()
    if qc.self.health:
        if qc.self.spawnflags & SPAWNFLAG_NOTOUCH:
            qc.objerror("health and notouch don't make sense\012")
        qc.self.max_health = qc.self.health
        qc.self.th_die = multi_killed
        qc.self.takedamage = defs.DAMAGE_YES
        qc.self.solid = defs.SOLID_BBOX
        qc.setorigin(qc.self,
                     qc.self.origin)  #  make sure it links into the world

    else:
        if not (qc.self.spawnflags & SPAWNFLAG_NOTOUCH):
            qc.self.touch = multi_touch
Пример #17
0
def item_health(*qwp_extra):
    qc.self.touch = health_touch
    if qc.self.spawnflags & H_ROTTEN:
        engine.precache_model('maps/b_bh10.bsp')
        engine.precache_sound('items/r_item1.wav')
        qc.self.setmodel('maps/b_bh10.bsp')
        qc.self.noise = 'items/r_item1.wav'
        qc.self.healamount = 15
        qc.self.healtype = 0
        
    elif qc.self.spawnflags & H_MEGA:
        engine.precache_model('maps/b_bh100.bsp')
        engine.precache_sound('items/r_item2.wav')
        qc.self.setmodel('maps/b_bh100.bsp')
        qc.self.noise = 'items/r_item2.wav'
        qc.self.healamount = 100
        qc.self.healtype = 2
        
    else:
        engine.precache_model('maps/b_bh25.bsp')
        engine.precache_sound('items/health1.wav')
        qc.self.setmodel('maps/b_bh25.bsp')
        qc.self.noise = 'items/health1.wav'
        qc.self.healamount = 25
        qc.self.healtype = 1
        
    qc.setsize(qc.self, Vector(0, 0, 0), Vector(32, 32, 56))
    StartItem()
Пример #18
0
def func_plat(*qwp_extra):
    t = engine.world
    if not qc.self.t_length:
        qc.self.t_length = 80
    if not qc.self.t_width:
        qc.self.t_width = 10
    if qc.self.sounds == 0:
        qc.self.sounds = 2
    #  FIX THIS TO LOAD A GENERIC PLAT SOUND
    if qc.self.sounds == 1:
        engine.precache_sound('plats/plat1.wav')
        engine.precache_sound('plats/plat2.wav')
        qc.self.noise = 'plats/plat1.wav'
        qc.self.noise1 = 'plats/plat2.wav'
        
    if qc.self.sounds == 2:
        engine.precache_sound('plats/medplat1.wav')
        engine.precache_sound('plats/medplat2.wav')
        qc.self.noise = 'plats/medplat1.wav'
        qc.self.noise1 = 'plats/medplat2.wav'
        
    qc.self.mangle = qc.self.angles
    qc.self.angles = Vector(0, 0, 0)
    qc.self.classname = 'plat'
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.setorigin(qc.self, qc.self.origin)
    qc.self.setmodel(qc.self.model)
    qc.setsize(qc.self, qc.self.mins, qc.self.maxs)
    qc.self.blocked = plat_crush
    if not qc.self.speed:
        qc.self.speed = 150
    #  pos1 is the top position, pos2 is the bottom
    qc.self.pos1 = qc.self.origin
    qc.self.pos2 = qc.self.origin
    if qc.self.height:
        qc.self.pos2 %= Vector(None, None, qc.self.origin.z - qc.self.height)
    else:
        qc.self.pos2 %= Vector(None, None, qc.self.origin.z - qc.self.size.z + 8)
    qc.self.use = plat_trigger_use
    plat_spawn_inside_trigger() #  the "start moving" trigger	
    if qc.self.targetname:
        qc.self.state = defs.STATE_UP
        qc.self.use = plat_use
        
    else:
        qc.setorigin(qc.self, qc.self.pos2)
        qc.self.state = defs.STATE_BOTTOM
Пример #19
0
def misc_teleporttrain(*qwp_extra):
    if not qc.self.speed:
        qc.self.speed = 100
    if not qc.self.target:
        qc.objerror('func_train without a target')
    qc.self.cnt = 1
    qc.self.solid = defs.SOLID_NOT
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.blocked = train_blocked
    qc.self.use = train_use
    qc.self.avelocity = Vector(100, 200, 300)
    qc.self.noise = ('misc/null.wav')
    engine.precache_sound('misc/null.wav')
    qc.self.noise1 = ('misc/null.wav')
    engine.precache_sound('misc/null.wav')
    engine.precache_model('progs/teleport.mdl')
    qc.self.setmodel('progs/teleport.mdl')
    qc.setsize(qc.self, qc.self.mins, qc.self.maxs)
    qc.setorigin(qc.self, qc.self.origin)
    #  start trains on the second frame, to make sure their targets have had
    #  a chance to spawn
    qc.self.nextthink = qc.self.ltime + 0.1
    qc.self.think = func_train_find
Пример #20
0
def misc_teleporttrain(*qwp_extra):
    if not qc.self.speed:
        qc.self.speed = 100
    if not qc.self.target:
        qc.objerror('func_train without a target')
    qc.self.cnt = 1
    qc.self.solid = defs.SOLID_NOT
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.blocked = train_blocked
    qc.self.use = train_use
    qc.self.avelocity = Vector(100, 200, 300)
    qc.self.noise = ('misc/null.wav')
    engine.precache_sound('misc/null.wav')
    qc.self.noise1 = ('misc/null.wav')
    engine.precache_sound('misc/null.wav')
    engine.precache_model('progs/teleport.mdl')
    qc.self.setmodel('progs/teleport.mdl')
    qc.setsize(qc.self, qc.self.mins, qc.self.maxs)
    qc.setorigin(qc.self, qc.self.origin)
    #  start trains on the second frame, to make sure their targets have had
    #  a chance to spawn
    qc.self.nextthink = qc.self.ltime + 0.1
    qc.self.think = func_train_find
Пример #21
0
def trap_spikeshooter(*qwp_extra):
    subs.SetMovedir()
    qc.self.use = spikeshooter_use
    if qc.self.spawnflags & SPAWNFLAG_LASER:
        engine.precache_model('progs/laser.mdl')
        engine.precache_sound('enforcer/enfire.wav')
        engine.precache_sound('enforcer/enfstop.wav')        
    else:
        engine.precache_sound('weapons/spike2.wav')
Пример #22
0
def trap_spikeshooter(*qwp_extra):
    subs.SetMovedir()
    qc.self.use = spikeshooter_use
    if qc.self.spawnflags & SPAWNFLAG_LASER:
        engine.precache_model('progs/laser.mdl')
        engine.precache_sound('enforcer/enfire.wav')
        engine.precache_sound('enforcer/enfstop.wav')
    else:
        engine.precache_sound('weapons/spike2.wav')
Пример #23
0
def item_sigil(*qwp_extra):
    if not qc.self.spawnflags:
        qc.objerror('no spawnflags')
    engine.precache_sound('misc/runekey.wav')
    qc.self.noise = 'misc/runekey.wav'
    if qc.self.spawnflags & 1:
        engine.precache_model('progs/end1.mdl')
        qc.self.setmodel('progs/end1.mdl')
        
    if qc.self.spawnflags & 2:
        engine.precache_model('progs/end2.mdl')
        qc.self.setmodel('progs/end2.mdl')
        
    if qc.self.spawnflags & 4:
        engine.precache_model('progs/end3.mdl')
        qc.self.setmodel('progs/end3.mdl')
        
    if qc.self.spawnflags & 8:
        engine.precache_model('progs/end4.mdl')
        qc.self.setmodel('progs/end4.mdl')
        
    qc.self.touch = sigil_touch
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #24
0
def item_sigil(*qwp_extra):
    if not qc.self.spawnflags:
        qc.objerror('no spawnflags')
    engine.precache_sound('misc/runekey.wav')
    qc.self.noise = 'misc/runekey.wav'
    if qc.self.spawnflags & 1:
        engine.precache_model('progs/end1.mdl')
        qc.self.setmodel('progs/end1.mdl')
        
    if qc.self.spawnflags & 2:
        engine.precache_model('progs/end2.mdl')
        qc.self.setmodel('progs/end2.mdl')
        
    if qc.self.spawnflags & 4:
        engine.precache_model('progs/end3.mdl')
        qc.self.setmodel('progs/end3.mdl')
        
    if qc.self.spawnflags & 8:
        engine.precache_model('progs/end4.mdl')
        qc.self.setmodel('progs/end4.mdl')
        
    qc.self.touch = sigil_touch
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #25
0
def item_artifact_invulnerability(*qwp_extra):
    qc.self.touch = powerup_touch
    engine.precache_model('progs/invulner.mdl')
    engine.precache_sound('items/protect.wav')
    engine.precache_sound('items/protect2.wav')
    engine.precache_sound('items/protect3.wav')
    qc.self.noise = 'items/protect.wav'
    qc.self.setmodel('progs/invulner.mdl')
    qc.self.netname = 'Pentagram of Protection'
    qc.self.items = defs.IT_INVULNERABILITY
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #26
0
def item_artifact_invisibility(*qwp_extra):
    qc.self.touch = powerup_touch
    engine.precache_model('progs/invisibl.mdl')
    engine.precache_sound('items/inv1.wav')
    engine.precache_sound('items/inv2.wav')
    engine.precache_sound('items/inv3.wav')
    qc.self.noise = 'items/inv1.wav'
    qc.self.setmodel('progs/invisibl.mdl')
    qc.self.netname = 'Ring of Shadows'
    qc.self.items = defs.IT_INVISIBILITY
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #27
0
def item_artifact_super_damage(*qwp_extra):
    qc.self.touch = powerup_touch
    engine.precache_model('progs/quaddama.mdl')
    engine.precache_sound('items/damage.wav')
    engine.precache_sound('items/damage2.wav')
    engine.precache_sound('items/damage3.wav')
    qc.self.noise = 'items/damage.wav'
    qc.self.setmodel('progs/quaddama.mdl')
    qc.self.netname = 'Quad Damage'
    qc.self.items = defs.IT_QUAD
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #28
0
def func_button(*qwp_extra):
    if qc.self.sounds == 0:
        engine.precache_sound('buttons/airbut1.wav')
        qc.self.noise = 'buttons/airbut1.wav'
        
    if qc.self.sounds == 1:
        engine.precache_sound('buttons/switch21.wav')
        qc.self.noise = 'buttons/switch21.wav'
        
    if qc.self.sounds == 2:
        engine.precache_sound('buttons/switch02.wav')
        qc.self.noise = 'buttons/switch02.wav'
        
    if qc.self.sounds == 3:
        engine.precache_sound('buttons/switch04.wav')
        qc.self.noise = 'buttons/switch04.wav'
        
    subs.SetMovedir()
    
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.solid = defs.SOLID_BSP
    qc.self.setmodel(qc.self.model)
    qc.self.blocked = button_blocked
    qc.self.use = button_use
    
    if qc.self.health:
        qc.self.max_health = qc.self.health
        qc.self.th_die = button_killed
        qc.self.takedamage = defs.DAMAGE_YES        
    else:
        qc.self.touch = button_touch
        
    if not qc.self.speed:
        qc.self.speed = 40
    if not qc.self.wait:
        qc.self.wait = 1
    if not qc.self.lip:
        qc.self.lip = 4
        
    qc.self.state = defs.STATE_BOTTOM
    qc.self.pos1 = qc.self.origin
    qc.self.pos2 = qc.self.pos1 + qc.self.movedir * (math.fabs(qc.self.movedir * qc.self.size) - qc.self.lip)
    
Пример #29
0
def item_artifact_invisibility(*qwp_extra):
    qc.self.touch = powerup_touch
    engine.precache_model('progs/invisibl.mdl')
    engine.precache_sound('items/inv1.wav')
    engine.precache_sound('items/inv2.wav')
    engine.precache_sound('items/inv3.wav')
    qc.self.noise = 'items/inv1.wav'
    qc.self.setmodel('progs/invisibl.mdl')
    qc.self.netname = 'Ring of Shadows'
    qc.self.items = defs.IT_INVISIBILITY
    qc.setsize(qc.self, Vector(-16, -16, -24), Vector(16, 16, 32))
    StartItem()
Пример #30
0
def key_setsounds(*qwp_extra):
    if qc.world.worldtype == 0:
        engine.precache_sound('misc/medkey.wav')
        qc.self.noise = 'misc/medkey.wav'
        
    if qc.world.worldtype == 1:
        engine.precache_sound('misc/runekey.wav')
        qc.self.noise = 'misc/runekey.wav'
        
    if qc.world.worldtype == 2:
        engine.precache_sound('misc/basekey.wav')
        qc.self.noise = 'misc/basekey.wav'
Пример #31
0
def key_setsounds(*qwp_extra):
    if qc.world.worldtype == 0:
        engine.precache_sound('misc/medkey.wav')
        qc.self.noise = 'misc/medkey.wav'
        
    if qc.world.worldtype == 1:
        engine.precache_sound('misc/runekey.wav')
        qc.self.noise = 'misc/runekey.wav'
        
    if qc.world.worldtype == 2:
        engine.precache_sound('misc/basekey.wav')
        qc.self.noise = 'misc/basekey.wav'
Пример #32
0
def item_flag_team1(*qwp_extra):
    if not defs.deathmatch or not (engine.cvar("teamplay") & TEAM_CAPTURE_FLAG):
        qc.self.remove()
        return

    qc.self.steam = TEAM_COLOR1
    qc.self.items = defs.IT_KEY2
    engine.precache_model("progs/flag.mdl")
    qc.self.setmodel("progs/flag.mdl")
    qc.self.skin = 0
    engine.precache_sound("misc/flagtk.wav")  #  flag taken
    engine.precache_sound("misc/flagcap.wav")  #  flag capture
    engine.precache_sound("doors/runetry.wav")
    qc.self.noise = "misc/flagtk.wav"
    qc.self.noise1 = "doors/runetry.wav"
    qc.setsize(qc.self, Vector(-16, -16, 0), Vector(16, 16, 74))
    qc.self.nextthink = qc.time + 0.2  #  items start after other solids
    qc.self.think = place_flag
Пример #33
0
def item_flag_team1(*qwp_extra):
    if not defs.deathmatch or not (engine.cvar('teamplay')
                                   & TEAM_CAPTURE_FLAG):
        qc.self.remove()
        return

    qc.self.steam = TEAM_COLOR1
    qc.self.items = defs.IT_KEY2
    engine.precache_model('progs/flag.mdl')
    qc.self.setmodel('progs/flag.mdl')
    qc.self.skin = 0
    engine.precache_sound('misc/flagtk.wav')  #  flag taken
    engine.precache_sound('misc/flagcap.wav')  #  flag capture
    engine.precache_sound('doors/runetry.wav')
    qc.self.noise = 'misc/flagtk.wav'
    qc.self.noise1 = 'doors/runetry.wav'
    qc.setsize(qc.self, Vector(-16, -16, 0), Vector(16, 16, 74))
    qc.self.nextthink = qc.time + 0.2  #  items start after other solids
    qc.self.think = place_flag
Пример #34
0
def main(*qwp_extra):
    engine.dprint('main function\012')
    #  these are just commands the the prog compiler to copy these files
    qc.precache_file('progs.dat')
    qc.precache_file('gfx.wad')
    qc.precache_file('quake.rc')
    qc.precache_file('default.cfg')
    qc.precache_file('end1.bin')
    qc.precache_file('end2.bin')
    qc.precache_file('demo1.dem')
    qc.precache_file('demo2.dem')
    qc.precache_file('demo3.dem')
    # 
    #  these are all of the lumps from the cached.ls files
    # 
    qc.precache_file('gfx/palette.lmp')
    qc.precache_file('gfx/colormap.lmp')
    qc.precache_file('gfx/pop.lmp')
    qc.precache_file('gfx/complete.lmp')
    qc.precache_file('gfx/inter.lmp')
    qc.precache_file('gfx/ranking.lmp')
    qc.precache_file('gfx/vidmodes.lmp')
    qc.precache_file('gfx/finale.lmp')
    qc.precache_file('gfx/conback.lmp')
    qc.precache_file('gfx/qplaque.lmp')
    qc.precache_file('gfx/menudot1.lmp')
    qc.precache_file('gfx/menudot2.lmp')
    qc.precache_file('gfx/menudot3.lmp')
    qc.precache_file('gfx/menudot4.lmp')
    qc.precache_file('gfx/menudot5.lmp')
    qc.precache_file('gfx/menudot6.lmp')
    qc.precache_file('gfx/menuplyr.lmp')
    qc.precache_file('gfx/bigbox.lmp')
    qc.precache_file('gfx/dim_modm.lmp')
    qc.precache_file('gfx/dim_drct.lmp')
    qc.precache_file('gfx/dim_ipx.lmp')
    qc.precache_file('gfx/dim_tcp.lmp')
    qc.precache_file('gfx/dim_mult.lmp')
    qc.precache_file('gfx/mainmenu.lmp')
    qc.precache_file('gfx/box_tl.lmp')
    qc.precache_file('gfx/box_tm.lmp')
    qc.precache_file('gfx/box_tr.lmp')
    qc.precache_file('gfx/box_ml.lmp')
    qc.precache_file('gfx/box_mm.lmp')
    qc.precache_file('gfx/box_mm2.lmp')
    qc.precache_file('gfx/box_mr.lmp')
    qc.precache_file('gfx/box_bl.lmp')
    qc.precache_file('gfx/box_bm.lmp')
    qc.precache_file('gfx/box_br.lmp')
    qc.precache_file('gfx/sp_menu.lmp')
    qc.precache_file('gfx/ttl_sgl.lmp')
    qc.precache_file('gfx/ttl_main.lmp')
    qc.precache_file('gfx/ttl_cstm.lmp')
    qc.precache_file('gfx/mp_menu.lmp')
    qc.precache_file('gfx/netmen1.lmp')
    qc.precache_file('gfx/netmen2.lmp')
    qc.precache_file('gfx/netmen3.lmp')
    qc.precache_file('gfx/netmen4.lmp')
    qc.precache_file('gfx/netmen5.lmp')
    qc.precache_file('gfx/sell.lmp')
    qc.precache_file('gfx/help0.lmp')
    qc.precache_file('gfx/help1.lmp')
    qc.precache_file('gfx/help2.lmp')
    qc.precache_file('gfx/help3.lmp')
    qc.precache_file('gfx/help4.lmp')
    qc.precache_file('gfx/help5.lmp')
    qc.precache_file('gfx/pause.lmp')
    qc.precache_file('gfx/loading.lmp')
    qc.precache_file('gfx/p_option.lmp')
    qc.precache_file('gfx/p_load.lmp')
    qc.precache_file('gfx/p_save.lmp')
    qc.precache_file('gfx/p_multi.lmp')
    #  sounds loaded by C code
    engine.precache_sound('misc/menu1.wav')
    engine.precache_sound('misc/menu2.wav')
    engine.precache_sound('misc/menu3.wav')
    engine.precache_sound('ambience/water1.wav')
    engine.precache_sound('ambience/wind2.wav')
    #  shareware
    qc.precache_file('maps/start.bsp')
    qc.precache_file('maps/e1m1.bsp')
    qc.precache_file('maps/e1m2.bsp')
    qc.precache_file('maps/e1m3.bsp')
    qc.precache_file('maps/e1m4.bsp')
    qc.precache_file('maps/e1m5.bsp')
    qc.precache_file('maps/e1m6.bsp')
    qc.precache_file('maps/e1m7.bsp')
    qc.precache_file('maps/e1m8.bsp')
    #  registered
    qc.precache_file('gfx/pop.lmp')
    qc.precache_file('maps/e2m1.bsp')
    qc.precache_file('maps/e2m2.bsp')
    qc.precache_file('maps/e2m3.bsp')
    qc.precache_file('maps/e2m4.bsp')
    qc.precache_file('maps/e2m5.bsp')
    qc.precache_file('maps/e2m6.bsp')
    qc.precache_file('maps/e2m7.bsp')
    qc.precache_file('maps/e3m1.bsp')
    qc.precache_file('maps/e3m2.bsp')
    qc.precache_file('maps/e3m3.bsp')
    qc.precache_file('maps/e3m4.bsp')
    qc.precache_file('maps/e3m5.bsp')
    qc.precache_file('maps/e3m6.bsp')
    qc.precache_file('maps/e3m7.bsp')
    qc.precache_file('maps/e4m1.bsp')
    qc.precache_file('maps/e4m2.bsp')
    qc.precache_file('maps/e4m3.bsp')
    qc.precache_file('maps/e4m4.bsp')
    qc.precache_file('maps/e4m5.bsp')
    qc.precache_file('maps/e4m6.bsp')
    qc.precache_file('maps/e4m7.bsp')
    qc.precache_file('maps/e4m8.bsp')
    qc.precache_file('maps/end.bsp')
    qc.precache_file('maps/dm1.bsp')
    qc.precache_file('maps/dm2.bsp')
    qc.precache_file('maps/dm3.bsp')
    qc.precache_file('maps/dm4.bsp')
    qc.precache_file('maps/dm5.bsp')
    qc.precache_file('maps/dm6.bsp')
Пример #35
0
def main(*qwp_extra):
    engine.dprint('main function\012')
    #  these are just commands the the prog compiler to copy these files
    qc.precache_file('progs.dat')
    qc.precache_file('gfx.wad')
    qc.precache_file('quake.rc')
    qc.precache_file('default.cfg')
    qc.precache_file('end1.bin')
    qc.precache_file('end2.bin')
    qc.precache_file('demo1.dem')
    qc.precache_file('demo2.dem')
    qc.precache_file('demo3.dem')
    #
    #  these are all of the lumps from the cached.ls files
    #
    qc.precache_file('gfx/palette.lmp')
    qc.precache_file('gfx/colormap.lmp')
    qc.precache_file('gfx/pop.lmp')
    qc.precache_file('gfx/complete.lmp')
    qc.precache_file('gfx/inter.lmp')
    qc.precache_file('gfx/ranking.lmp')
    qc.precache_file('gfx/vidmodes.lmp')
    qc.precache_file('gfx/finale.lmp')
    qc.precache_file('gfx/conback.lmp')
    qc.precache_file('gfx/qplaque.lmp')
    qc.precache_file('gfx/menudot1.lmp')
    qc.precache_file('gfx/menudot2.lmp')
    qc.precache_file('gfx/menudot3.lmp')
    qc.precache_file('gfx/menudot4.lmp')
    qc.precache_file('gfx/menudot5.lmp')
    qc.precache_file('gfx/menudot6.lmp')
    qc.precache_file('gfx/menuplyr.lmp')
    qc.precache_file('gfx/bigbox.lmp')
    qc.precache_file('gfx/dim_modm.lmp')
    qc.precache_file('gfx/dim_drct.lmp')
    qc.precache_file('gfx/dim_ipx.lmp')
    qc.precache_file('gfx/dim_tcp.lmp')
    qc.precache_file('gfx/dim_mult.lmp')
    qc.precache_file('gfx/mainmenu.lmp')
    qc.precache_file('gfx/box_tl.lmp')
    qc.precache_file('gfx/box_tm.lmp')
    qc.precache_file('gfx/box_tr.lmp')
    qc.precache_file('gfx/box_ml.lmp')
    qc.precache_file('gfx/box_mm.lmp')
    qc.precache_file('gfx/box_mm2.lmp')
    qc.precache_file('gfx/box_mr.lmp')
    qc.precache_file('gfx/box_bl.lmp')
    qc.precache_file('gfx/box_bm.lmp')
    qc.precache_file('gfx/box_br.lmp')
    qc.precache_file('gfx/sp_menu.lmp')
    qc.precache_file('gfx/ttl_sgl.lmp')
    qc.precache_file('gfx/ttl_main.lmp')
    qc.precache_file('gfx/ttl_cstm.lmp')
    qc.precache_file('gfx/mp_menu.lmp')
    qc.precache_file('gfx/netmen1.lmp')
    qc.precache_file('gfx/netmen2.lmp')
    qc.precache_file('gfx/netmen3.lmp')
    qc.precache_file('gfx/netmen4.lmp')
    qc.precache_file('gfx/netmen5.lmp')
    qc.precache_file('gfx/sell.lmp')
    qc.precache_file('gfx/help0.lmp')
    qc.precache_file('gfx/help1.lmp')
    qc.precache_file('gfx/help2.lmp')
    qc.precache_file('gfx/help3.lmp')
    qc.precache_file('gfx/help4.lmp')
    qc.precache_file('gfx/help5.lmp')
    qc.precache_file('gfx/pause.lmp')
    qc.precache_file('gfx/loading.lmp')
    qc.precache_file('gfx/p_option.lmp')
    qc.precache_file('gfx/p_load.lmp')
    qc.precache_file('gfx/p_save.lmp')
    qc.precache_file('gfx/p_multi.lmp')
    #  sounds loaded by C code
    engine.precache_sound('misc/menu1.wav')
    engine.precache_sound('misc/menu2.wav')
    engine.precache_sound('misc/menu3.wav')
    engine.precache_sound('ambience/water1.wav')
    engine.precache_sound('ambience/wind2.wav')
    #  shareware
    qc.precache_file('maps/start.bsp')
    qc.precache_file('maps/e1m1.bsp')
    qc.precache_file('maps/e1m2.bsp')
    qc.precache_file('maps/e1m3.bsp')
    qc.precache_file('maps/e1m4.bsp')
    qc.precache_file('maps/e1m5.bsp')
    qc.precache_file('maps/e1m6.bsp')
    qc.precache_file('maps/e1m7.bsp')
    qc.precache_file('maps/e1m8.bsp')
    #  registered
    qc.precache_file('gfx/pop.lmp')
    qc.precache_file('maps/e2m1.bsp')
    qc.precache_file('maps/e2m2.bsp')
    qc.precache_file('maps/e2m3.bsp')
    qc.precache_file('maps/e2m4.bsp')
    qc.precache_file('maps/e2m5.bsp')
    qc.precache_file('maps/e2m6.bsp')
    qc.precache_file('maps/e2m7.bsp')
    qc.precache_file('maps/e3m1.bsp')
    qc.precache_file('maps/e3m2.bsp')
    qc.precache_file('maps/e3m3.bsp')
    qc.precache_file('maps/e3m4.bsp')
    qc.precache_file('maps/e3m5.bsp')
    qc.precache_file('maps/e3m6.bsp')
    qc.precache_file('maps/e3m7.bsp')
    qc.precache_file('maps/e4m1.bsp')
    qc.precache_file('maps/e4m2.bsp')
    qc.precache_file('maps/e4m3.bsp')
    qc.precache_file('maps/e4m4.bsp')
    qc.precache_file('maps/e4m5.bsp')
    qc.precache_file('maps/e4m6.bsp')
    qc.precache_file('maps/e4m7.bsp')
    qc.precache_file('maps/e4m8.bsp')
    qc.precache_file('maps/end.bsp')
    qc.precache_file('maps/dm1.bsp')
    qc.precache_file('maps/dm2.bsp')
    qc.precache_file('maps/dm3.bsp')
    qc.precache_file('maps/dm4.bsp')
    qc.precache_file('maps/dm5.bsp')
    qc.precache_file('maps/dm6.bsp')
Пример #36
0
def worldspawn(*qwp_extra):
    global lastspawn

    lastspawn = qc.world
    defs.runespawn = qc.world
    defs.runespawned = 0
    InitBodyQue()
    #  custom map attributes
    #  can't change gravity in QuakeWorld
    #
    # 	if (self.model == "maps/e1m8.bsp")
    # 		cvar_set ("sv_gravity", "100");
    # 	else
    # 		cvar_set ("sv_gravity", "800");
    #
    if qc.self.model == 'maps/ctfstart.bsp' or qc.self.model == 'maps/start.bsp':
        defs.gamestart = 1
    else:
        defs.gamestart = 0
    #  the area based ambient sounds MUST be the first precache_sounds
    #  player precaches
    weapons.W_Precache()  #  get weapon precaches
    #  sounds used from C physics code
    engine.precache_sound('demon/dland2.wav')  #  landing thud
    engine.precache_sound('misc/h2ohit1.wav')  #  landing splash
    #  setup precaches allways needed
    engine.precache_sound('items/itembk2.wav')  #  item respawn sound
    engine.precache_sound('player/plyrjmp8.wav')  #  player jump
    engine.precache_sound('player/land.wav')  #  player landing
    engine.precache_sound('player/land2.wav')  #  player hurt landing
    engine.precache_sound('player/drown1.wav')  #  drowning pain
    engine.precache_sound('player/drown2.wav')  #  drowning pain
    engine.precache_sound('player/gasp1.wav')  #  gasping for air
    engine.precache_sound('player/gasp2.wav')  #  taking breath
    engine.precache_sound('player/h2odeath.wav')  #  drowning death
    engine.precache_sound('misc/talk.wav')  #  talk
    engine.precache_sound('player/teledth1.wav')  #  telefrag
    engine.precache_sound('misc/r_tele1.wav')  #  teleport sounds
    engine.precache_sound('misc/r_tele2.wav')
    engine.precache_sound('misc/r_tele3.wav')
    engine.precache_sound('misc/r_tele4.wav')
    engine.precache_sound('misc/r_tele5.wav')
    engine.precache_sound('weapons/lock4.wav')  #  ammo pick up
    engine.precache_sound('weapons/pkup.wav')  #  weapon up
    engine.precache_sound('items/armor1.wav')  #  armor up
    engine.precache_sound('weapons/lhit.wav')  # lightning
    engine.precache_sound('weapons/lstart.wav')  # lightning start
    engine.precache_sound('items/damage3.wav')
    engine.precache_sound('misc/power.wav')  # lightning for boss
    #  player gib sounds
    engine.precache_sound('player/gib.wav')  #  player gib sound
    engine.precache_sound('player/udeath.wav')  #  player gib sound
    engine.precache_sound('player/tornoff2.wav')  #  gib sound
    #  player pain sounds
    engine.precache_sound('player/pain1.wav')
    engine.precache_sound('player/pain2.wav')
    engine.precache_sound('player/pain3.wav')
    engine.precache_sound('player/pain4.wav')
    engine.precache_sound('player/pain5.wav')
    engine.precache_sound('player/pain6.wav')
    #  player death sounds
    engine.precache_sound('player/death1.wav')
    engine.precache_sound('player/death2.wav')
    engine.precache_sound('player/death3.wav')
    engine.precache_sound('player/death4.wav')
    engine.precache_sound('player/death5.wav')
    #  ax sounds
    engine.precache_sound('weapons/ax1.wav')  #  ax swoosh
    engine.precache_sound('player/axhit1.wav')  #  ax hit meat
    engine.precache_sound('player/axhit2.wav')  #  ax hit world
    engine.precache_sound('hknight/hit.wav')  #  ZOID: hook launch
    engine.precache_sound('player/h2ojump.wav')  #  player jumping into water
    engine.precache_sound('player/slimbrn2.wav')  #  player enter slime
    engine.precache_sound('player/inh2o.wav')  #  player enter water
    engine.precache_sound('player/inlava.wav')  #  player enter lava
    engine.precache_sound('misc/outwater.wav')  #  leaving water sound
    engine.precache_sound('player/lburn1.wav')  #  lava burn
    engine.precache_sound('player/lburn2.wav')  #  lava burn
    engine.precache_sound('misc/water1.wav')  #  swimming
    engine.precache_sound('misc/water2.wav')  #  swimming
    engine.precache_model('progs/player.mdl')
    engine.precache_model('progs/h_player.mdl')
    engine.precache_model('progs/eyes.mdl')
    engine.precache_model('progs/gib1.mdl')
    engine.precache_model('progs/gib2.mdl')
    engine.precache_model('progs/gib3.mdl')
    engine.precache_model('progs/s_bubble.spr')  #  drowning bubbles
    engine.precache_model('progs/s_explod.spr')  #  sprite explosion
    engine.precache_model('progs/v_axe.mdl')
    engine.precache_model('progs/v_shot.mdl')
    engine.precache_model('progs/v_nail.mdl')
    engine.precache_model('progs/v_rock.mdl')
    engine.precache_model('progs/v_shot2.mdl')
    engine.precache_model('progs/v_nail2.mdl')
    engine.precache_model('progs/v_rock2.mdl')
    engine.precache_model('progs/v_star.mdl')  #  precache grapple (Wedge)
    engine.precache_model('progs/bit.mdl')  #  precache grapple (Wedge)
    engine.precache_model('progs/star.mdl')  #  precache grapple (Wedge)
    engine.precache_model('progs/bolt.mdl')  #  for lightning gun
    engine.precache_model('progs/bolt2.mdl')  #  for lightning gun
    engine.precache_model('progs/bolt3.mdl')  #  for boss shock
    engine.precache_model('progs/lavaball.mdl')  #  for testing
    engine.precache_model('progs/missile.mdl')
    engine.precache_model('progs/grenade.mdl')
    engine.precache_model('progs/spike.mdl')
    engine.precache_model('progs/s_spike.mdl')
    engine.precache_model('progs/backpack.mdl')
    engine.precache_model('progs/zom_gib.mdl')
    engine.precache_model('progs/v_light.mdl')
    #
    #  Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
    #
    #  0 normal
    engine.lightstyle(0, 'm')
    #  1 FLICKER (first variety)
    engine.lightstyle(1, 'mmnmmommommnonmmonqnmmo')
    #  2 SLOW STRONG PULSE
    engine.lightstyle(2, 'abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba')
    #  3 CANDLE (first variety)
    engine.lightstyle(3, 'mmmmmaaaaammmmmaaaaaabcdefgabcdefg')
    #  4 FAST STROBE
    engine.lightstyle(4, 'mamamamamama')
    #  5 GENTLE PULSE 1
    engine.lightstyle(5, 'jklmnopqrstuvwxyzyxwvutsrqponmlkj')
    #  6 FLICKER (second variety)
    engine.lightstyle(6, 'nmonqnmomnmomomno')
    #  7 CANDLE (second variety)
    engine.lightstyle(7, 'mmmaaaabcdefgmmmmaaaammmaamm')
    #  8 CANDLE (third variety)
    engine.lightstyle(8, 'mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa')
    #  9 SLOW STROBE (fourth variety)
    engine.lightstyle(9, 'aaaaaaaazzzzzzzz')
    #  10 FLUORESCENT FLICKER
    engine.lightstyle(10, 'mmamammmmammamamaaamammma')
    #  11 SLOW PULSE NOT FADE TO BLACK
    engine.lightstyle(11, 'abcdefghijklmnopqrrqponmlkjihgfedcba')
    #  styles 32-62 are assigned by the light program for switchable lights
    #  63 testing
    engine.lightstyle(63, 'a')
Пример #37
0
def func_door(*qwp_extra):
    if qc.world.worldtype == 0:
        engine.precache_sound('doors/medtry.wav')
        engine.precache_sound('doors/meduse.wav')
        qc.self.noise3 = 'doors/medtry.wav'
        qc.self.noise4 = 'doors/meduse.wav'        
    elif qc.world.worldtype == 1:
        engine.precache_sound('doors/runetry.wav')
        engine.precache_sound('doors/runeuse.wav')
        qc.self.noise3 = 'doors/runetry.wav'
        qc.self.noise4 = 'doors/runeuse.wav'        
    elif qc.world.worldtype == 2:
        engine.precache_sound('doors/basetry.wav')
        engine.precache_sound('doors/baseuse.wav')
        qc.self.noise3 = 'doors/basetry.wav'
        qc.self.noise4 = 'doors/baseuse.wav'        
    else:
        engine.dprint('no worldtype set!\012')
        
    if qc.self.sounds == 0:
        engine.precache_sound('misc/null.wav')
        engine.precache_sound('misc/null.wav')
        qc.self.noise1 = 'misc/null.wav'
        qc.self.noise2 = 'misc/null.wav'
        
    if qc.self.sounds == 1:
        engine.precache_sound('doors/drclos4.wav')
        engine.precache_sound('doors/doormv1.wav')
        qc.self.noise1 = 'doors/drclos4.wav'
        qc.self.noise2 = 'doors/doormv1.wav'
        
    if qc.self.sounds == 2:
        engine.precache_sound('doors/hydro1.wav')
        engine.precache_sound('doors/hydro2.wav')
        qc.self.noise2 = 'doors/hydro1.wav'
        qc.self.noise1 = 'doors/hydro2.wav'
        
    if qc.self.sounds == 3:
        engine.precache_sound('doors/stndr1.wav')
        engine.precache_sound('doors/stndr2.wav')
        qc.self.noise2 = 'doors/stndr1.wav'
        qc.self.noise1 = 'doors/stndr2.wav'
        
    if qc.self.sounds == 4:
        engine.precache_sound('doors/ddoor1.wav')
        engine.precache_sound('doors/ddoor2.wav')
        qc.self.noise1 = 'doors/ddoor2.wav'
        qc.self.noise2 = 'doors/ddoor1.wav'
        
    subs.SetMovedir()
    qc.self.max_health = qc.self.health
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.setorigin(qc.self, qc.self.origin)
    qc.self.setmodel(qc.self.model)
    qc.self.classname = 'door'
    qc.self.blocked = door_blocked
    qc.self.use = door_use
    if qc.self.spawnflags & DOOR_SILVER_KEY:
        qc.self.items = defs.IT_KEY1
    if qc.self.spawnflags & DOOR_GOLD_KEY:
        qc.self.items = defs.IT_KEY2
    if not qc.self.speed:
        qc.self.speed = 100
    if not qc.self.wait:
        qc.self.wait = 3
    if not qc.self.lip:
        qc.self.lip = 8
    if not qc.self.dmg:
        qc.self.dmg = 2
    qc.self.pos1 = qc.self.origin
    qc.self.pos2 = qc.self.pos1 + qc.self.movedir * (math.fabs(qc.self.movedir * qc.self.size) - qc.self.lip)
    #  DOOR_START_OPEN is to allow an entity to be lighted in the closed position
    #  but spawn in the open position
    if qc.self.spawnflags & DOOR_START_OPEN:
        qc.setorigin(qc.self, qc.self.pos2)
        qc.self.pos2 = qc.self.pos1
        qc.self.pos1 = qc.self.origin
        
    qc.self.state = defs.STATE_BOTTOM
    if qc.self.health:
        qc.self.takedamage = defs.DAMAGE_YES
        qc.self.th_die = door_killed
        
    if qc.self.items:
        qc.self.wait = -1
    qc.self.touch = door_touch
    #  LinkDoors can't be done until all of the doors have been spawned, so
    #  the sizes can be detected properly.
    qc.self.think = LinkDoors
    qc.self.nextthink = qc.self.ltime + 0.1
Пример #38
0
def light_fluorospark(*qwp_extra):
    if not qc.self.style:
        qc.self.style = 10
    engine.precache_sound('ambience/buzz1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/buzz1.wav', 0.5, defs.ATTN_STATIC)
Пример #39
0
def ambient_comp_hum(*qwp_extra):
    engine.precache_sound('ambience/comp1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/comp1.wav', 1, defs.ATTN_STATIC)
Пример #40
0
def ambient_swamp2(*qwp_extra):
    engine.precache_sound('ambience/swamp2.wav')
    engine.ambientsound(qc.self.origin, 'ambience/swamp2.wav', 0.5, defs.ATTN_STATIC)
Пример #41
0
def func_door(*qwp_extra):
    if qc.world.worldtype == 0:
        engine.precache_sound('doors/medtry.wav')
        engine.precache_sound('doors/meduse.wav')
        qc.self.noise3 = 'doors/medtry.wav'
        qc.self.noise4 = 'doors/meduse.wav'
    elif qc.world.worldtype == 1:
        engine.precache_sound('doors/runetry.wav')
        engine.precache_sound('doors/runeuse.wav')
        qc.self.noise3 = 'doors/runetry.wav'
        qc.self.noise4 = 'doors/runeuse.wav'
    elif qc.world.worldtype == 2:
        engine.precache_sound('doors/basetry.wav')
        engine.precache_sound('doors/baseuse.wav')
        qc.self.noise3 = 'doors/basetry.wav'
        qc.self.noise4 = 'doors/baseuse.wav'
    else:
        engine.dprint('no worldtype set!\012')

    if qc.self.sounds == 0:
        engine.precache_sound('misc/null.wav')
        engine.precache_sound('misc/null.wav')
        qc.self.noise1 = 'misc/null.wav'
        qc.self.noise2 = 'misc/null.wav'

    if qc.self.sounds == 1:
        engine.precache_sound('doors/drclos4.wav')
        engine.precache_sound('doors/doormv1.wav')
        qc.self.noise1 = 'doors/drclos4.wav'
        qc.self.noise2 = 'doors/doormv1.wav'

    if qc.self.sounds == 2:
        engine.precache_sound('doors/hydro1.wav')
        engine.precache_sound('doors/hydro2.wav')
        qc.self.noise2 = 'doors/hydro1.wav'
        qc.self.noise1 = 'doors/hydro2.wav'

    if qc.self.sounds == 3:
        engine.precache_sound('doors/stndr1.wav')
        engine.precache_sound('doors/stndr2.wav')
        qc.self.noise2 = 'doors/stndr1.wav'
        qc.self.noise1 = 'doors/stndr2.wav'

    if qc.self.sounds == 4:
        engine.precache_sound('doors/ddoor1.wav')
        engine.precache_sound('doors/ddoor2.wav')
        qc.self.noise1 = 'doors/ddoor2.wav'
        qc.self.noise2 = 'doors/ddoor1.wav'

    subs.SetMovedir()
    qc.self.max_health = qc.self.health
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.setorigin(qc.self, qc.self.origin)
    qc.self.setmodel(qc.self.model)
    qc.self.classname = 'door'
    qc.self.blocked = door_blocked
    qc.self.use = door_use
    if qc.self.spawnflags & DOOR_SILVER_KEY:
        qc.self.items = defs.IT_KEY1
    if qc.self.spawnflags & DOOR_GOLD_KEY:
        qc.self.items = defs.IT_KEY2
    if not qc.self.speed:
        qc.self.speed = 100
    if not qc.self.wait:
        qc.self.wait = 3
    if not qc.self.lip:
        qc.self.lip = 8
    if not qc.self.dmg:
        qc.self.dmg = 2
    qc.self.pos1 = qc.self.origin
    qc.self.pos2 = qc.self.pos1 + qc.self.movedir * (
        math.fabs(qc.self.movedir * qc.self.size) - qc.self.lip)
    #  DOOR_START_OPEN is to allow an entity to be lighted in the closed position
    #  but spawn in the open position
    if qc.self.spawnflags & DOOR_START_OPEN:
        qc.setorigin(qc.self, qc.self.pos2)
        qc.self.pos2 = qc.self.pos1
        qc.self.pos1 = qc.self.origin

    qc.self.state = defs.STATE_BOTTOM
    if qc.self.health:
        qc.self.takedamage = defs.DAMAGE_YES
        qc.self.th_die = door_killed

    if qc.self.items:
        qc.self.wait = -1
    qc.self.touch = door_touch
    #  LinkDoors can't be done until all of the doors have been spawned, so
    #  the sizes can be detected properly.
    qc.self.think = LinkDoors
    qc.self.nextthink = qc.self.ltime + 0.1
Пример #42
0
def W_Precache(*qwp_extra):
    engine.precache_sound('hknight/hit.wav')  #  flamethrower
    engine.precache_sound('weapons/r_exp3.wav')  #  new rocket explosion
    engine.precache_sound('weapons/rocket1i.wav')  #  spike gun
    engine.precache_sound('weapons/sgun1.wav')
    engine.precache_sound('weapons/guncock.wav')  #  player shotgun
    engine.precache_sound('weapons/ric1.wav')  #  ricochet (used in c code)
    engine.precache_sound('weapons/ric2.wav')  #  ricochet (used in c code)
    engine.precache_sound('weapons/ric3.wav')  #  ricochet (used in c code)
    engine.precache_sound('weapons/spike2.wav')  #  super spikes
    engine.precache_sound('weapons/tink1.wav')  #  spikes tink (used in c code)
    engine.precache_sound('weapons/grenade.wav')  #  grenade launcher
    engine.precache_sound('weapons/bounce.wav')  #  grenade bounce
    engine.precache_sound('weapons/shotgn2.wav')  #  super shotgun

    # grapple sounds (wedge)
    engine.precache_sound('weapons/chain1.wav')
    engine.precache_sound('weapons/chain2.wav')
    engine.precache_sound('weapons/chain3.wav')
    engine.precache_sound('weapons/bounce2.wav')
    engine.precache_sound('blob/land1.wav')

    #  ZOID:
    #  normally the weapon models are precached in the individual item
    #  creation routines.  But since we've added impulse 21 we can drop
    #  weapons at any time.  Must precache all weapon models.
    engine.precache_model('progs/g_shot.mdl')
    engine.precache_model('progs/g_nail.mdl')
    engine.precache_model('progs/g_nail2.mdl')
    engine.precache_model('progs/g_rock.mdl')
    engine.precache_model('progs/g_rock2.mdl')
    engine.precache_model('progs/g_light.mdl')
Пример #43
0
def ambient_light_buzz(*qwp_extra):
    engine.precache_sound('ambience/fl_hum1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/fl_hum1.wav', 0.5,
                        defs.ATTN_STATIC)
Пример #44
0
def ambient_light_buzz(*qwp_extra):
    engine.precache_sound('ambience/fl_hum1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/fl_hum1.wav', 0.5, defs.ATTN_STATIC)
Пример #45
0
def ambient_swamp2(*qwp_extra):
    engine.precache_sound('ambience/swamp2.wav')
    engine.ambientsound(qc.self.origin, 'ambience/swamp2.wav', 0.5,
                        defs.ATTN_STATIC)
Пример #46
0
def worldspawn(*qwp_extra):
    global lastspawn

    lastspawn = qc.world
    defs.runespawn = qc.world
    defs.runespawned = 0
    InitBodyQue()
    #  custom map attributes
    #  can't change gravity in QuakeWorld
    #
    # 	if (self.model == "maps/e1m8.bsp")
    # 		cvar_set ("sv_gravity", "100");
    # 	else
    # 		cvar_set ("sv_gravity", "800");
    #
    if qc.self.model == "maps/ctfstart.bsp" or qc.self.model == "maps/start.bsp":
        defs.gamestart = 1
    else:
        defs.gamestart = 0
    #  the area based ambient sounds MUST be the first precache_sounds
    #  player precaches
    weapons.W_Precache()  #  get weapon precaches
    #  sounds used from C physics code
    engine.precache_sound("demon/dland2.wav")  #  landing thud
    engine.precache_sound("misc/h2ohit1.wav")  #  landing splash
    #  setup precaches allways needed
    engine.precache_sound("items/itembk2.wav")  #  item respawn sound
    engine.precache_sound("player/plyrjmp8.wav")  #  player jump
    engine.precache_sound("player/land.wav")  #  player landing
    engine.precache_sound("player/land2.wav")  #  player hurt landing
    engine.precache_sound("player/drown1.wav")  #  drowning pain
    engine.precache_sound("player/drown2.wav")  #  drowning pain
    engine.precache_sound("player/gasp1.wav")  #  gasping for air
    engine.precache_sound("player/gasp2.wav")  #  taking breath
    engine.precache_sound("player/h2odeath.wav")  #  drowning death
    engine.precache_sound("misc/talk.wav")  #  talk
    engine.precache_sound("player/teledth1.wav")  #  telefrag
    engine.precache_sound("misc/r_tele1.wav")  #  teleport sounds
    engine.precache_sound("misc/r_tele2.wav")
    engine.precache_sound("misc/r_tele3.wav")
    engine.precache_sound("misc/r_tele4.wav")
    engine.precache_sound("misc/r_tele5.wav")
    engine.precache_sound("weapons/lock4.wav")  #  ammo pick up
    engine.precache_sound("weapons/pkup.wav")  #  weapon up
    engine.precache_sound("items/armor1.wav")  #  armor up
    engine.precache_sound("weapons/lhit.wav")  # lightning
    engine.precache_sound("weapons/lstart.wav")  # lightning start
    engine.precache_sound("items/damage3.wav")
    engine.precache_sound("misc/power.wav")  # lightning for boss
    #  player gib sounds
    engine.precache_sound("player/gib.wav")  #  player gib sound
    engine.precache_sound("player/udeath.wav")  #  player gib sound
    engine.precache_sound("player/tornoff2.wav")  #  gib sound
    #  player pain sounds
    engine.precache_sound("player/pain1.wav")
    engine.precache_sound("player/pain2.wav")
    engine.precache_sound("player/pain3.wav")
    engine.precache_sound("player/pain4.wav")
    engine.precache_sound("player/pain5.wav")
    engine.precache_sound("player/pain6.wav")
    #  player death sounds
    engine.precache_sound("player/death1.wav")
    engine.precache_sound("player/death2.wav")
    engine.precache_sound("player/death3.wav")
    engine.precache_sound("player/death4.wav")
    engine.precache_sound("player/death5.wav")
    #  ax sounds
    engine.precache_sound("weapons/ax1.wav")  #  ax swoosh
    engine.precache_sound("player/axhit1.wav")  #  ax hit meat
    engine.precache_sound("player/axhit2.wav")  #  ax hit world
    engine.precache_sound("hknight/hit.wav")  #  ZOID: hook launch
    engine.precache_sound("player/h2ojump.wav")  #  player jumping into water
    engine.precache_sound("player/slimbrn2.wav")  #  player enter slime
    engine.precache_sound("player/inh2o.wav")  #  player enter water
    engine.precache_sound("player/inlava.wav")  #  player enter lava
    engine.precache_sound("misc/outwater.wav")  #  leaving water sound
    engine.precache_sound("player/lburn1.wav")  #  lava burn
    engine.precache_sound("player/lburn2.wav")  #  lava burn
    engine.precache_sound("misc/water1.wav")  #  swimming
    engine.precache_sound("misc/water2.wav")  #  swimming
    engine.precache_model("progs/player.mdl")
    engine.precache_model("progs/h_player.mdl")
    engine.precache_model("progs/eyes.mdl")
    engine.precache_model("progs/gib1.mdl")
    engine.precache_model("progs/gib2.mdl")
    engine.precache_model("progs/gib3.mdl")
    engine.precache_model("progs/s_bubble.spr")  #  drowning bubbles
    engine.precache_model("progs/s_explod.spr")  #  sprite explosion
    engine.precache_model("progs/v_axe.mdl")
    engine.precache_model("progs/v_shot.mdl")
    engine.precache_model("progs/v_nail.mdl")
    engine.precache_model("progs/v_rock.mdl")
    engine.precache_model("progs/v_shot2.mdl")
    engine.precache_model("progs/v_nail2.mdl")
    engine.precache_model("progs/v_rock2.mdl")
    engine.precache_model("progs/v_star.mdl")  #  precache grapple (Wedge)
    engine.precache_model("progs/bit.mdl")  #  precache grapple (Wedge)
    engine.precache_model("progs/star.mdl")  #  precache grapple (Wedge)
    engine.precache_model("progs/bolt.mdl")  #  for lightning gun
    engine.precache_model("progs/bolt2.mdl")  #  for lightning gun
    engine.precache_model("progs/bolt3.mdl")  #  for boss shock
    engine.precache_model("progs/lavaball.mdl")  #  for testing
    engine.precache_model("progs/missile.mdl")
    engine.precache_model("progs/grenade.mdl")
    engine.precache_model("progs/spike.mdl")
    engine.precache_model("progs/s_spike.mdl")
    engine.precache_model("progs/backpack.mdl")
    engine.precache_model("progs/zom_gib.mdl")
    engine.precache_model("progs/v_light.mdl")
    #
    #  Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
    #
    #  0 normal
    engine.lightstyle(0, "m")
    #  1 FLICKER (first variety)
    engine.lightstyle(1, "mmnmmommommnonmmonqnmmo")
    #  2 SLOW STRONG PULSE
    engine.lightstyle(2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba")
    #  3 CANDLE (first variety)
    engine.lightstyle(3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg")
    #  4 FAST STROBE
    engine.lightstyle(4, "mamamamamama")
    #  5 GENTLE PULSE 1
    engine.lightstyle(5, "jklmnopqrstuvwxyzyxwvutsrqponmlkj")
    #  6 FLICKER (second variety)
    engine.lightstyle(6, "nmonqnmomnmomomno")
    #  7 CANDLE (second variety)
    engine.lightstyle(7, "mmmaaaabcdefgmmmmaaaammmaamm")
    #  8 CANDLE (third variety)
    engine.lightstyle(8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa")
    #  9 SLOW STROBE (fourth variety)
    engine.lightstyle(9, "aaaaaaaazzzzzzzz")
    #  10 FLUORESCENT FLICKER
    engine.lightstyle(10, "mmamammmmammamamaaamammma")
    #  11 SLOW PULSE NOT FADE TO BLACK
    engine.lightstyle(11, "abcdefghijklmnopqrrqponmlkjihgfedcba")
    #  styles 32-62 are assigned by the light program for switchable lights
    #  63 testing
    engine.lightstyle(63, "a")
Пример #47
0
def func_door_secret(*qwp_extra):
    if qc.self.sounds == 0:
        qc.self.sounds = 3
    if qc.self.sounds == 1:
        engine.precache_sound('doors/latch2.wav')
        engine.precache_sound('doors/winch2.wav')
        engine.precache_sound('doors/drclos4.wav')
        qc.self.noise1 = 'doors/latch2.wav'
        qc.self.noise2 = 'doors/winch2.wav'
        qc.self.noise3 = 'doors/drclos4.wav'
        
    if qc.self.sounds == 2:
        engine.precache_sound('doors/airdoor1.wav')
        engine.precache_sound('doors/airdoor2.wav')
        qc.self.noise2 = 'doors/airdoor1.wav'
        qc.self.noise1 = 'doors/airdoor2.wav'
        qc.self.noise3 = 'doors/airdoor2.wav'
        
    if qc.self.sounds == 3:
        engine.precache_sound('doors/basesec1.wav')
        engine.precache_sound('doors/basesec2.wav')
        qc.self.noise2 = 'doors/basesec1.wav'
        qc.self.noise1 = 'doors/basesec2.wav'
        qc.self.noise3 = 'doors/basesec2.wav'
        
    if not qc.self.dmg:
        qc.self.dmg = 2
    #  Magic formula...
    qc.self.mangle = qc.self.angles
    qc.self.angles = Vector(0, 0, 0)
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.classname = 'door'
    qc.self.setmodel(qc.self.model)
    qc.setorigin(qc.self, qc.self.origin)
    qc.self.touch = secret_touch
    qc.self.blocked = secret_blocked
    qc.self.speed = 50
    qc.self.use = fd_secret_use
    if not qc.self.targetname or qc.self.spawnflags & SECRET_YES_SHOOT:
        qc.self.health = 10000
        qc.self.takedamage = defs.DAMAGE_YES
        qc.self.th_pain = fd_secret_use
        qc.self.th_die = fd_secret_use
        
    qc.self.oldorigin = qc.self.origin
    if not qc.self.wait:
        qc.self.wait = 5 #  5 seconds before closing
Пример #48
0
def worldspawn(*qwp_extra):
    global lastspawn
    lastspawn = qc.world
    InitBodyQue()
    #  custom map attributes
    if qc.self.model == 'maps/e1m8.bsp':
        engine.cvar_set('sv_gravity', '100')
    else:
        engine.cvar_set('sv_gravity', '800')
    #  the area based ambient sounds MUST be the first precache_sounds
    #  player precaches     
    weapons.W_Precache() #  get weapon precaches
    #  sounds used from C physics code
    engine.precache_sound('demon/dland2.wav') #  landing thud
    engine.precache_sound('misc/h2ohit1.wav') #  landing splash
    #  setup precaches allways needed
    engine.precache_sound('items/itembk2.wav') #  item respawn sound
    engine.precache_sound('player/plyrjmp8.wav') #  player jump
    engine.precache_sound('player/land.wav') #  player landing
    engine.precache_sound('player/land2.wav') #  player hurt landing
    engine.precache_sound('player/drown1.wav') #  drowning pain
    engine.precache_sound('player/drown2.wav') #  drowning pain
    engine.precache_sound('player/gasp1.wav') #  gasping for air
    engine.precache_sound('player/gasp2.wav') #  taking breath
    engine.precache_sound('player/h2odeath.wav') #  drowning death
    engine.precache_sound('misc/talk.wav') #  talk
    engine.precache_sound('player/teledth1.wav') #  telefrag
    engine.precache_sound('misc/r_tele1.wav') #  teleport sounds
    engine.precache_sound('misc/r_tele2.wav')
    engine.precache_sound('misc/r_tele3.wav')
    engine.precache_sound('misc/r_tele4.wav')
    engine.precache_sound('misc/r_tele5.wav')
    engine.precache_sound('weapons/lock4.wav') #  ammo pick up
    engine.precache_sound('weapons/pkup.wav') #  weapon up
    engine.precache_sound('items/armor1.wav') #  armor up
    engine.precache_sound('weapons/lhit.wav') # lightning
    engine.precache_sound('weapons/lstart.wav') # lightning start
    engine.precache_sound('items/damage3.wav')
    engine.precache_sound('misc/power.wav') # lightning for boss
    #  player gib sounds
    engine.precache_sound('player/gib.wav') #  player gib sound
    engine.precache_sound('player/udeath.wav') #  player gib sound
    engine.precache_sound('player/tornoff2.wav') #  gib sound
    #  player pain sounds
    engine.precache_sound('player/pain1.wav')
    engine.precache_sound('player/pain2.wav')
    engine.precache_sound('player/pain3.wav')
    engine.precache_sound('player/pain4.wav')
    engine.precache_sound('player/pain5.wav')
    engine.precache_sound('player/pain6.wav')
    #  player death sounds
    engine.precache_sound('player/death1.wav')
    engine.precache_sound('player/death2.wav')
    engine.precache_sound('player/death3.wav')
    engine.precache_sound('player/death4.wav')
    engine.precache_sound('player/death5.wav')
    engine.precache_sound('boss1/sight1.wav')
    #  ax sounds    
    engine.precache_sound('weapons/ax1.wav') #  ax swoosh
    engine.precache_sound('player/axhit1.wav') #  ax hit meat
    engine.precache_sound('player/axhit2.wav') #  ax hit world
    engine.precache_sound('player/h2ojump.wav') #  player jumping into water
    engine.precache_sound('player/slimbrn2.wav') #  player enter slime
    engine.precache_sound('player/inh2o.wav') #  player enter water
    engine.precache_sound('player/inlava.wav') #  player enter lava
    engine.precache_sound('misc/outwater.wav') #  leaving water sound
    engine.precache_sound('player/lburn1.wav') #  lava burn
    engine.precache_sound('player/lburn2.wav') #  lava burn
    engine.precache_sound('misc/water1.wav') #  swimming
    engine.precache_sound('misc/water2.wav') #  swimming
    #  Invulnerability sounds
    engine.precache_sound('items/protect.wav')
    engine.precache_sound('items/protect2.wav')
    engine.precache_sound('items/protect3.wav')
    engine.precache_model('progs/player.mdl')
    engine.precache_model('progs/eyes.mdl')
    engine.precache_model('progs/h_player.mdl')
    engine.precache_model('progs/gib1.mdl')
    engine.precache_model('progs/gib2.mdl')
    engine.precache_model('progs/gib3.mdl')
    engine.precache_model('progs/s_bubble.spr') #  drowning bubbles
    engine.precache_model('progs/s_explod.spr') #  sprite explosion
    engine.precache_model('progs/v_axe.mdl')
    engine.precache_model('progs/v_shot.mdl')
    engine.precache_model('progs/v_nail.mdl')
    engine.precache_model('progs/v_rock.mdl')
    engine.precache_model('progs/v_shot2.mdl')
    engine.precache_model('progs/v_nail2.mdl')
    engine.precache_model('progs/v_rock2.mdl')
    engine.precache_model('progs/bolt.mdl') #  for lightning gun
    engine.precache_model('progs/bolt2.mdl') #  for lightning gun
    engine.precache_model('progs/bolt3.mdl') #  for boss shock
    engine.precache_model('progs/lavaball.mdl') #  for testing
    engine.precache_model('progs/missile.mdl')
    engine.precache_model('progs/grenade.mdl')
    engine.precache_model('progs/spike.mdl')
    engine.precache_model('progs/s_spike.mdl')
    engine.precache_model('progs/backpack.mdl')
    engine.precache_model('progs/zom_gib.mdl')
    engine.precache_model('progs/v_light.mdl')
    # 
    #  Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
    # 
    #  0 normal
    engine.lightstyle(0, 'm')
    #  1 FLICKER (first variety)
    engine.lightstyle(1, 'mmnmmommommnonmmonqnmmo')
    #  2 SLOW STRONG PULSE
    engine.lightstyle(2, 'abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba')
    #  3 CANDLE (first variety)
    engine.lightstyle(3, 'mmmmmaaaaammmmmaaaaaabcdefgabcdefg')
    #  4 FAST STROBE
    engine.lightstyle(4, 'mamamamamama')
    #  5 GENTLE PULSE 1
    engine.lightstyle(5, 'jklmnopqrstuvwxyzyxwvutsrqponmlkj')
    #  6 FLICKER (second variety)
    engine.lightstyle(6, 'nmonqnmomnmomomno')
    #  7 CANDLE (second variety)
    engine.lightstyle(7, 'mmmaaaabcdefgmmmmaaaammmaamm')
    #  8 CANDLE (third variety)
    engine.lightstyle(8, 'mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa')
    #  9 SLOW STROBE (fourth variety)
    engine.lightstyle(9, 'aaaaaaaazzzzzzzz')
    #  10 FLUORESCENT FLICKER
    engine.lightstyle(10, 'mmamammmmammamamaaamammma')
    #  11 SLOW PULSE NOT FADE TO BLACK
    engine.lightstyle(11, 'abcdefghijklmnopqrrqponmlkjihgfedcba')
    #  styles 32-62 are assigned by the light program for switchable lights
    #  63 testing
    engine.lightstyle(63, 'a')
Пример #49
0
def ambient_thunder(*qwp_extra):
    engine.precache_sound('ambience/thunder1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/thunder1.wav', 0.5,
                        defs.ATTN_STATIC)
Пример #50
0
def ambient_comp_hum(*qwp_extra):
    engine.precache_sound('ambience/comp1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/comp1.wav', 1,
                        defs.ATTN_STATIC)
Пример #51
0
def misc_noisemaker(*qwp_extra):
    engine.precache_sound('enforcer/enfire.wav')
    engine.precache_sound('enforcer/enfstop.wav')
    engine.precache_sound('enforcer/sight1.wav')
    engine.precache_sound('enforcer/sight2.wav')
    engine.precache_sound('enforcer/sight3.wav')
    engine.precache_sound('enforcer/sight4.wav')
    engine.precache_sound('enforcer/pain1.wav')
    engine.precache_sound('enforcer/pain2.wav')
    engine.precache_sound('enforcer/death1.wav')
    engine.precache_sound('enforcer/idle1.wav')
    qc.self.nextthink = qc.time + 0.1 + random.random()
    qc.self.think = noise_think
Пример #52
0
def misc_noisemaker(*qwp_extra):
    engine.precache_sound('enforcer/enfire.wav')
    engine.precache_sound('enforcer/enfstop.wav')
    engine.precache_sound('enforcer/sight1.wav')
    engine.precache_sound('enforcer/sight2.wav')
    engine.precache_sound('enforcer/sight3.wav')
    engine.precache_sound('enforcer/sight4.wav')
    engine.precache_sound('enforcer/pain1.wav')
    engine.precache_sound('enforcer/pain2.wav')
    engine.precache_sound('enforcer/death1.wav')
    engine.precache_sound('enforcer/idle1.wav')
    qc.self.nextthink = qc.time + 0.1 + random.random()
    qc.self.think = noise_think
Пример #53
0
def light_fluorospark(*qwp_extra):
    if not qc.self.style:
        qc.self.style = 10
    engine.precache_sound('ambience/buzz1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/buzz1.wav', 0.5,
                        defs.ATTN_STATIC)
Пример #54
0
def ambient_thunder(*qwp_extra):
    engine.precache_sound('ambience/thunder1.wav')
    engine.ambientsound(qc.self.origin, 'ambience/thunder1.wav', 0.5, defs.ATTN_STATIC)
Пример #55
0
def func_door_secret(*qwp_extra):
    if qc.self.sounds == 0:
        qc.self.sounds = 3
    if qc.self.sounds == 1:
        engine.precache_sound('doors/latch2.wav')
        engine.precache_sound('doors/winch2.wav')
        engine.precache_sound('doors/drclos4.wav')
        qc.self.noise1 = 'doors/latch2.wav'
        qc.self.noise2 = 'doors/winch2.wav'
        qc.self.noise3 = 'doors/drclos4.wav'

    if qc.self.sounds == 2:
        engine.precache_sound('doors/airdoor1.wav')
        engine.precache_sound('doors/airdoor2.wav')
        qc.self.noise2 = 'doors/airdoor1.wav'
        qc.self.noise1 = 'doors/airdoor2.wav'
        qc.self.noise3 = 'doors/airdoor2.wav'

    if qc.self.sounds == 3:
        engine.precache_sound('doors/basesec1.wav')
        engine.precache_sound('doors/basesec2.wav')
        qc.self.noise2 = 'doors/basesec1.wav'
        qc.self.noise1 = 'doors/basesec2.wav'
        qc.self.noise3 = 'doors/basesec2.wav'

    if not qc.self.dmg:
        qc.self.dmg = 2
    #  Magic formula...
    qc.self.mangle = qc.self.angles
    qc.self.angles = Vector(0, 0, 0)
    qc.self.solid = defs.SOLID_BSP
    qc.self.movetype = defs.MOVETYPE_PUSH
    qc.self.classname = 'door'
    qc.self.setmodel(qc.self.model)
    qc.setorigin(qc.self, qc.self.origin)
    qc.self.touch = secret_touch
    qc.self.blocked = secret_blocked
    qc.self.speed = 50
    qc.self.use = fd_secret_use
    if not qc.self.targetname or qc.self.spawnflags & SECRET_YES_SHOOT:
        qc.self.health = 10000
        qc.self.takedamage = defs.DAMAGE_YES
        qc.self.th_pain = fd_secret_use
        qc.self.th_die = fd_secret_use

    qc.self.oldorigin = qc.self.origin
    if not qc.self.wait:
        qc.self.wait = 5  #  5 seconds before closing