def light_use(*qwp_extra): if qc.self.spawnflags & START_OFF: engine.lightstyle(qc.self.style, 'm') qc.self.spawnflags -= START_OFF else: engine.lightstyle(qc.self.style, 'a') qc.self.spawnflags += START_OFF
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)
def light(*qwp_extra): if not qc.self.targetname: # inert light qc.self.remove() return 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')
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')
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')
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")