Added sound file & cinematic intro stuff

master
AlmTech 5 years ago
parent e3c59f298e
commit 03c5edcdba
  1. 13
      gamemode/engine/core/client/cl_sounds.lua
  2. 20
      gamemode/engine/derma/lib/cl_menu_dialogueBox.lua
  3. 21
      gamemode/engine/derma/menus/menu_intro.lua

@ -0,0 +1,13 @@
-- __ _ _______ _ __
-- / / /\ | | |__ __| | | \ \
-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \
-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > >
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
sound.Add( {
name = "Quantum_Music_TriangeAtDawn",
channel = CHAN_STATIC,
volume = 0.75,
sound = "music/HL2_song23_SuitSong3.mp3"
} )

@ -31,12 +31,14 @@ function log.createinfobox( logdata, parent )
header.w, header.h = header:GetSize() header.w, header.h = header:GetSize()
header:SetPos( box.x, ( box.y - header.h ) - padding/2 ) header:SetPos( box.x, ( box.y - header.h ) - padding/2 )
header.Think = function( self ) header.Think = function( self )
if( logdata[Quantum.Client.Cam.Temp.scene_index].title ~= nil ) then if( logdata[Quantum.Client.Cam.Temp.scene_index] ~= nil ) then
self:SetVisible( true ) if( logdata[Quantum.Client.Cam.Temp.scene_index].title ~= nil ) then
self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title ) self:SetVisible( true )
surface.SetFont( self:GetFont() ) self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title )
local tw, th = surface.GetTextSize( self:GetText() ) surface.SetFont( self:GetFont() )
self:SetSize( tw * 1.1, th * 1.1 ) local tw, th = surface.GetTextSize( self:GetText() )
self:SetSize( tw * 1.1, th * 1.1 )
end
end end
end end
header.Paint = function( self ) header.Paint = function( self )
@ -67,7 +69,11 @@ function log.createinfobox( logdata, parent )
text:SetPos( scroll.w/2 - text.w/2, 0 ) text:SetPos( scroll.w/2 - text.w/2, 0 )
text.Think = function( self ) self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].text ) end text.Think = function( self )
if( logdata[Quantum.Client.Cam.Temp.scene_index] ~= nil ) then
self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].text )
end
end
return box return box
end end

@ -43,10 +43,27 @@ local scenes = { -- 5031.821777 3866.334961 120.090790;setang 0.898059 56.421352
pos2 = Vector( 10881.356445, 5483.074219, 132.792114 ), pos2 = Vector( 10881.356445, 5483.074219, 132.792114 ),
ang1 = Angle( 0.052806, 85.319626, 0.000000 ), ang1 = Angle( 0.052806, 85.319626, 0.000000 ),
ang2 = Angle( -0.105593, 90.978638, 0.000000 ) ang2 = Angle( -0.105593, 90.978638, 0.000000 )
},
[5] = {
fov = 60,
velocity = 12,
pos1 = Vector( 3114.608887, -13817.962891, 82.778885 ),
pos2 = Vector( 5247.718262, -14413.496094, 74.946350 ),
ang1 = Angle( 0.844603, -15.770578, 0.000000 ),
ang2 = Angle( 2.006202, 37.927032, 0.000000 )
},
[6] = {
fov = 60,
velocity = 12,
pos1 = Vector( 6830.229004, 9614.283203, 105.920792 ),
pos2 = Vector( 6675.346191, 9711.740234, 102.549484 ),
ang1 = Angle( 1.055771, 147.803604, 0.000000 ),
ang2 = Angle( 1.055771, 149.803604, 0.000000 )
} }
} }
} }
function intro.open( dt ) function intro.open( dt )
local chars = dt.cont local chars = dt.cont
local resScale = Quantum.Client.ResolutionScale local resScale = Quantum.Client.ResolutionScale
@ -77,7 +94,9 @@ function intro.open( dt )
f.w, f.h = f:GetSize() f.w, f.h = f:GetSize()
--- MUSIC --- --- MUSIC ---
surface.PlaySound( "music/HL1_song10.mp3" ) -- get some better music --surface.PlaySound( "music/HL1_song11.mp3" ) -- too short
--surface.PlaySound( "music/HL2_song23_SuitSong3.mp3" )
--LocalPlayer():EmitSound("Quantum_Music_TriangeAtDawn")
local skip = vgui.Create( "DButton", f ) local skip = vgui.Create( "DButton", f )
skip:SetText( "Skip Intro" ) skip:SetText( "Skip Intro" )

Loading…
Cancel
Save